Skip to content

Commit 5f1fdd0

Browse files
committed
CPP: Post-2115.
1 parent 096af3c commit 5f1fdd0

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

cpp/ql/test/query-tests/jsf/4.13 Functions/AV Rule 114/AV Rule 114.expected

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
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 |
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11

2-
/*_Complex double complexTest1(float a, float b) {
3-
_Complex double x = __builtin_complex(a, b); // BAD [EXTRACTOR ERROR]
2+
_Complex double complexTest1(float a, float b) {
3+
_Complex double x = __builtin_complex(a, b); // BAD
44
}
55

66
_Complex double complexTest2(float a, float b) {
7-
auto x = __builtin_complex(a, b) * 2.0f; // BAD [EXTRACTOR ERROR]
7+
auto x = __builtin_complex(a, b) * 2.0f; // BAD
88
}
99

1010
_Complex double complexTest3(float a, float b) {
11-
return __builtin_complex(a, b); // GOOD [EXTRACTOR ERROR]
11+
return __builtin_complex(a, b); // GOOD
1212
}
1313

1414
auto complexTest4(float a, float b) {
15-
return __builtin_complex(a, b) * 2.0f; // GOOD [EXTRACTOR ERROR]
16-
}*/
15+
return __builtin_complex(a, b) * 2.0f; // GOOD
16+
}

0 commit comments

Comments
 (0)