mirror of
https://github.com/github/codeql.git
synced 2026-04-27 17:55:19 +02:00
C++: Add bool operator to IR test
This commit is contained in:
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -2191,6 +2191,7 @@ public:
|
||||
|
||||
void set_x(char y) { *x = y; }
|
||||
char get_x() { return *x; }
|
||||
operator bool() const;
|
||||
};
|
||||
|
||||
constexpr bool initialization_with_destructor_bool = true;
|
||||
@@ -2539,4 +2540,18 @@ void destructor_possibly_not_handled() {
|
||||
}
|
||||
}
|
||||
|
||||
// ClassWithDestructor getClassWithDestructor();
|
||||
|
||||
// void this_inconsistency(bool b) {
|
||||
// if (const ClassWithDestructor& a = getClassWithDestructor())
|
||||
// ;
|
||||
// }
|
||||
|
||||
// constexpr bool initialization_with_destructor_bool = true;
|
||||
|
||||
// void constexpr_inconsistency(bool b) {
|
||||
// if constexpr (const ClassWithDestructor& a = getClassWithDestructor(); initialization_with_destructor_bool)
|
||||
// ;
|
||||
// }
|
||||
|
||||
// semmle-extractor-options: -std=c++20 --clang
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user