File tree Expand file tree Collapse file tree 2 files changed +5
-8
lines changed
src/semmle/code/cpp/internal
test/library-tests/syntax-zoo Expand file tree Collapse file tree 2 files changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,11 @@ private predicate constantAddressLValue(Expr lvalue) {
3232 // tells us how it's going to be used.
3333 lvalue .( FunctionAccess ) .getType ( ) instanceof RoutineType
3434 or
35+ // Pointer-to-member literals in uninstantiated templates
36+ lvalue instanceof Literal and
37+ not exists ( lvalue .getValue ( ) ) and
38+ lvalue .isFromUninstantiatedTemplate ( _)
39+ or
3540 // String literals have array types and undergo array-to-pointer conversion.
3641 lvalue instanceof StringLiteral
3742 or
Original file line number Diff line number Diff line change 1- | pointer_to_member__pmIsConstT | pointer_to_member.cpp:41:3:44:29 | declaration | pointer_to_member.cpp:44:11:44:28 | initializer for pms | Standard edge, only from QL | uninstantiated |
2- | pointer_to_member__pmIsConstT | pointer_to_member.cpp:41:3:44:29 | declaration | pointer_to_member.cpp:45:1:45:1 | return ... | Standard edge, only from extractor | uninstantiated |
3- | pointer_to_member__pmIsConstT | pointer_to_member.cpp:44:11:44:28 | initializer for pms | pointer_to_member.cpp:44:14:44:18 | Unknown literal | Standard edge, only from QL | uninstantiated |
4- | pointer_to_member__pmIsConstT | pointer_to_member.cpp:44:11:44:28 | {...} | pointer_to_member.cpp:45:1:45:1 | return ... | Standard edge, only from QL | uninstantiated |
5- | pointer_to_member__pmIsConstT | pointer_to_member.cpp:44:13:44:18 | & ... | pointer_to_member.cpp:44:22:44:26 | Unknown literal | Standard edge, only from QL | uninstantiated |
6- | pointer_to_member__pmIsConstT | pointer_to_member.cpp:44:14:44:18 | Unknown literal | pointer_to_member.cpp:44:13:44:18 | & ... | Standard edge, only from QL | uninstantiated |
7- | pointer_to_member__pmIsConstT | pointer_to_member.cpp:44:21:44:26 | & ... | pointer_to_member.cpp:44:11:44:28 | {...} | Standard edge, only from QL | uninstantiated |
8- | pointer_to_member__pmIsConstT | pointer_to_member.cpp:44:22:44:26 | Unknown literal | pointer_to_member.cpp:44:21:44:26 | & ... | Standard edge, only from QL | uninstantiated |
91| staticlocals__staticlocals_f2 | file://:0:0:0:0 | call to C | staticlocals.cpp:30:1:30:1 | return ... | Standard edge, only from QL | |
102| staticlocals__staticlocals_f2 | file://:0:0:0:0 | initializer for c | file://:0:0:0:0 | call to C | Standard edge, only from QL | |
113| staticlocals__staticlocals_f2 | staticlocals.cpp:29:5:29:17 | declaration | file://:0:0:0:0 | initializer for c | Standard edge, only from QL | |
You can’t perform that action at this time.
0 commit comments