mirror of
https://github.com/github/codeql.git
synced 2026-04-25 08:45:14 +02:00
C++: Add failing test.
This commit is contained in:
@@ -3,6 +3,9 @@ uniqueEnclosingCallable
|
||||
| test.cpp:864:47:864:54 | call to source | Node should have one enclosing callable but has 0. |
|
||||
| test.cpp:872:46:872:51 | call to source | Node should have one enclosing callable but has 0. |
|
||||
| test.cpp:872:53:872:56 | 1 | Node should have one enclosing callable but has 0. |
|
||||
| test.cpp:1126:33:1129:1 | {...} | Node should have one enclosing callable but has 0. |
|
||||
| test.cpp:1127:3:1127:13 | reads_input | Node should have one enclosing callable but has 0. |
|
||||
| test.cpp:1128:3:1128:21 | not_does_read_input | Node should have one enclosing callable but has 0. |
|
||||
uniqueCallEnclosingCallable
|
||||
| test.cpp:864:47:864:54 | call to source | Call should have one enclosing callable but has 0. |
|
||||
| test.cpp:872:46:872:51 | call to source | Call should have one enclosing callable but has 0. |
|
||||
|
||||
@@ -1115,4 +1115,20 @@ void indirect_sink_const_ref(const T&);
|
||||
|
||||
void test_temp_with_conversion_from_materialization() {
|
||||
indirect_sink_const_ref(source()); // $ ir MISSING: ast
|
||||
}
|
||||
|
||||
void reads_input(int x) {
|
||||
sink(x); // $ MISSING: ast,ir
|
||||
}
|
||||
|
||||
void not_does_read_input(int x);
|
||||
|
||||
void (*dispatch_table[])(int) = {
|
||||
reads_input,
|
||||
not_does_read_input
|
||||
};
|
||||
|
||||
void test_dispatch_table(int i) {
|
||||
int x = source();
|
||||
dispatch_table[i](x);
|
||||
}
|
||||
Reference in New Issue
Block a user