C++: Add bool operator to IR test

This commit is contained in:
Jeroen Ketema
2024-05-08 11:38:50 +02:00
parent 61580da14d
commit 2dcb55cc42
4 changed files with 7644 additions and 7627 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -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