Skip to content

Commit 3d1a64d

Browse files
committed
C++: Add a test for the static local compiler-generated variable that's generated by the frontend on empty parameter packs.
1 parent b711b32 commit 3d1a64d

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

cpp/ql/test/library-tests/compiler_generated/compilerGenerated.expected

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,9 @@
2121
| cpp.cpp:19:26:19:44 | initializer for __PRETTY_FUNCTION__ | Initializer |
2222
| cpp.cpp:19:26:19:44 | void uses_pretty_function() | Expr |
2323
| cpp.cpp:20:1:20:1 | return ... | Stmt |
24+
| cpp.cpp:23:29:23:32 | args | Variable |
25+
| cpp.cpp:23:37:23:37 | return ... | Stmt |
26+
| cpp.cpp:23:37:23:37 | return ... | Stmt |
27+
| cpp.cpp:27:1:27:1 | return ... | Stmt |
2428
| file://:0:0:0:0 | operator delete | Function |
2529
| file://:0:0:0:0 | operator new | Function |

cpp/ql/test/library-tests/compiler_generated/cpp.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,11 @@ void g1(void) {
1717

1818
void uses_pretty_function() {
1919
const char* pretty = __PRETTY_FUNCTION__;
20+
}
21+
22+
template <typename... Args>
23+
void parameter_pack(Args... args) { }
24+
25+
void test_parameter_pack() {
26+
parameter_pack();
2027
}

0 commit comments

Comments
 (0)