CPP: Add test cases involving __builtin_complex.

This commit is contained in:
Geoffrey White
2019-10-16 11:24:02 +01:00
parent 712762481c
commit 096af3c3f3

View File

@@ -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]
}*/