mirror of
https://github.com/github/codeql.git
synced 2026-04-30 19:26:02 +02:00
CPP: Add test cases involving __builtin_complex.
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
|
||||
/*_Complex double complexTest1(float a, float b) {
|
||||
_Complex double x = __builtin_complex(a, b); // BAD [EXTRACTOR ERROR]
|
||||
}
|
||||
|
||||
_Complex double complexTest2(float a, float b) {
|
||||
auto x = __builtin_complex(a, b) * 2.0f; // BAD [EXTRACTOR ERROR]
|
||||
}
|
||||
|
||||
_Complex double complexTest3(float a, float b) {
|
||||
return __builtin_complex(a, b); // GOOD [EXTRACTOR ERROR]
|
||||
}
|
||||
|
||||
auto complexTest4(float a, float b) {
|
||||
return __builtin_complex(a, b) * 2.0f; // GOOD [EXTRACTOR ERROR]
|
||||
}*/
|
||||
Reference in New Issue
Block a user