File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed
cpp/ql/test/query-tests/jsf/4.13 Functions/AV Rule 114 Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change 1+ | complex.c:3:2:3:45 | declaration | Function complexTest1 should return a value of type _Complex double but does not return a value here |
2+ | complex.c:7:2:7:41 | declaration | Function complexTest2 should return a value of type _Complex double but does not return a value here |
13| test.c:8:5:8:14 | declaration | Function f2 should return a value of type int but does not return a value here |
24| test.c:25:9:25:14 | ExprStmt | Function f4 should return a value of type int but does not return a value here |
35| test.c:39:9:39:14 | ExprStmt | Function f6 should return a value of type int but does not return a value here |
Original file line number Diff line number Diff line change 1+
2+ _Complex double complexTest1 (float a , float b ) {
3+ _Complex double x = __builtin_complex (a , b ); // BAD
4+ }
5+
6+ _Complex double complexTest2 (float a , float b ) {
7+ auto x = __builtin_complex (a , b ) * 2.0f ; // BAD
8+ }
9+
10+ _Complex double complexTest3 (float a , float b ) {
11+ return __builtin_complex (a , b ); // GOOD
12+ }
13+
14+ auto complexTest4 (float a , float b ) {
15+ return __builtin_complex (a , b ) * 2.0f ; // GOOD
16+ }
You can’t perform that action at this time.
0 commit comments