mirror of
https://github.com/github/codeql.git
synced 2026-05-05 05:35:13 +02:00
C++: Test for template enum constant CFG
This commit is contained in:
@@ -29,4 +29,16 @@ void f2() {
|
||||
static C c{};
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
struct Sizeof {
|
||||
enum sizeof_enum { value = sizeof(T) };
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
void f3() {
|
||||
static int i = Sizeof<T>::value;
|
||||
}
|
||||
|
||||
template void f3<int>();
|
||||
|
||||
}
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
| staticlocals__staticlocals_f2 | file://:0:0:0:0 | call to C | staticlocals.cpp:30:1:30:1 | return ... | Standard edge, only from QL | |
|
||||
| staticlocals__staticlocals_f2 | file://:0:0:0:0 | initializer for c | file://:0:0:0:0 | call to C | Standard edge, only from QL | |
|
||||
| staticlocals__staticlocals_f2 | staticlocals.cpp:29:5:29:17 | declaration | file://:0:0:0:0 | initializer for c | Standard edge, only from QL | |
|
||||
| staticlocals__staticlocals_f3 | staticlocals.cpp:39:3:39:34 | declaration | staticlocals.cpp:39:18:39:33 | initializer for i | Standard edge, only from QL | uninstantiated |
|
||||
| staticlocals__staticlocals_f3 | staticlocals.cpp:39:18:39:33 | Unknown literal | staticlocals.cpp:40:1:40:1 | return ... | Standard edge, only from QL | uninstantiated |
|
||||
| staticlocals__staticlocals_f3 | staticlocals.cpp:39:18:39:33 | initializer for i | staticlocals.cpp:39:18:39:33 | Unknown literal | Standard edge, only from QL | uninstantiated |
|
||||
|
||||
Reference in New Issue
Block a user