File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed
cpp/ql/test/query-tests/jsf/4.13 Functions/AV Rule 114 Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change 10
10
| test.cpp:112:1:112:1 | return ... | Function g14 should return a value of type int but does not return a value here |
11
11
| test.cpp:134:2:134:36 | ExprStmt | Function g16 should return a value of type int but does not return a value here |
12
12
| test.cpp:141:3:141:37 | ExprStmt | Function g17 should return a value of type int but does not return a value here |
13
+ | test.cpp:189:2:189:16 | ExprStmt | Function g23 should return a value of type int but does not return a value here |
Original file line number Diff line number Diff line change @@ -170,3 +170,21 @@ int g19(int x)
170
170
int g21 () {
171
171
g20 (); // GOOD
172
172
}
173
+
174
+ class Aborting {
175
+ public:
176
+ [[noreturn]]
177
+ ~Aborting ();
178
+
179
+ void a () {};
180
+ };
181
+
182
+ int g22 () {
183
+ Aborting x;
184
+
185
+ x.a (); // GOOD
186
+ }
187
+
188
+ int g23 () {
189
+ Aborting ().a (); // GOOD [FALSE POSITIVE]
190
+ }
You can’t perform that action at this time.
0 commit comments