-
Notifications
You must be signed in to change notification settings - Fork 13.5k
[analyzer] alpha.cplusplus.InvalidatedIterator checker crashes on c++23 code with deducing this #116372
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
Comments
@llvm/issue-subscribers-clang-static-analyzer Author: Michael Jabbour (michael-jabbour-sonarsource)
The following example:
// clang-19 -std=c++23 --analyze -Xclang -analyzer-config -Xclang aggressive-binary-operation-simplification=true -Xclang -analyzer-checker=alpha.cplusplus.InvalidatedIterator -Xclang -analyzer-output=text file.cpp
class ExplicitThis {
int f = 0;
public:
ExplicitThis();
ExplicitThis(ExplicitThis& other);
ExplicitThis& operator=(this ExplicitThis& self, ExplicitThis const& other) {
self.f = other.f;
return self;
}
~ExplicitThis();
};
void func(ExplicitThis& obj1) {
obj1 = obj1;
} crashes the analyzer (both when assertions are enabled and disabled). Stack trace:
Compiler Explorer link: https://godbolt.org/z/rbTfGorMK |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
The following example:
crashes the analyzer (both when assertions are enabled and disabled).
Stack trace:
Compiler Explorer link: https://godbolt.org/z/rbTfGorMK
The text was updated successfully, but these errors were encountered: