Skip to content

Commit 798357f

Browse files
committed
C++: Add test case that shows that __func__ is not considered static
1 parent 9f4c138 commit 798357f

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

cpp/ql/test/library-tests/variables/variables/variable.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,4 @@
3939
| variables.cpp:51:9:51:12 | town | file://:0:0:0:0 | char * | Field | | |
4040
| variables.cpp:52:16:52:22 | country | file://:0:0:0:0 | char * | MemberVariable, StaticStorageDurationVariable | | static |
4141
| variables.cpp:56:14:56:29 | externInFunction | file://:0:0:0:0 | int | GlobalLikeVariable, GlobalVariable, StaticStorageDurationVariable | | |
42+
| variables.cpp:60:10:60:17 | __func__ | file://:0:0:0:0 | const char[9] | LocalVariable, SemanticStackVariable | | |

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,7 @@ struct address {
5555
void hasExtern() {
5656
extern int externInFunction;
5757
}
58+
59+
const char* isStatic() {
60+
return __func__;
61+
}

0 commit comments

Comments
 (0)