mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
C++: Add an example of missing MaD supporrt for non-type template parameters.
This commit is contained in:
@@ -17,4 +17,5 @@ extensions:
|
||||
- ["", "", False, "ymlStepGenerated", "", "", "Argument[0]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["", "", False, "ymlStepManual_with_body", "", "", "Argument[0]", "ReturnValue", "taint", "manual"]
|
||||
- ["", "", False, "ymlStepGenerated_with_body", "", "", "Argument[0]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["", "", False, "callWithArgument", "", "", "Argument[1]", "Argument[0].Parameter[0]", "value", "manual"]
|
||||
- ["", "", False, "callWithArgument", "", "", "Argument[1]", "Argument[0].Parameter[0]", "value", "manual"]
|
||||
- ["", "", False, "callWithNonTypeTemplate<T>", "(const T &)", "", "Argument[*0]", "ReturnValue", "value", "manual"]
|
||||
@@ -13,3 +13,4 @@
|
||||
| test.cpp:75:11:75:11 | y | test-sink |
|
||||
| test.cpp:83:11:83:11 | y | test-sink |
|
||||
| test.cpp:89:11:89:11 | y | test-sink |
|
||||
| test.cpp:113:10:113:10 | y | test-sink |
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
| test.cpp:10:10:10:18 | call to ymlSource | local |
|
||||
| test.cpp:56:8:56:16 | call to ymlSource | local |
|
||||
| test.cpp:94:10:94:18 | call to ymlSource | local |
|
||||
| test.cpp:111:10:111:18 | call to ymlSource | local |
|
||||
| windows.cpp:22:15:22:29 | *call to GetCommandLineA | local |
|
||||
| windows.cpp:34:17:34:38 | *call to GetEnvironmentStringsA | local |
|
||||
| windows.cpp:39:36:39:38 | GetEnvironmentVariableA output argument | local |
|
||||
|
||||
@@ -102,4 +102,13 @@ void test_callWithArgument() {
|
||||
}
|
||||
callWithArgument(StructWithOperatorCall_has_constructor_2(), x);
|
||||
callWithArgument(StructWithOperatorCall_no_constructor_2(), x);
|
||||
}
|
||||
|
||||
template<int N, typename T>
|
||||
T callWithNonTypeTemplate(const T&);
|
||||
|
||||
void test_callWithNonTypeTemplate() {
|
||||
int x = ymlSource();
|
||||
int y = callWithNonTypeTemplate<10, int>(x);
|
||||
ymlSink(y); // $ MISSING: ir
|
||||
}
|
||||
Reference in New Issue
Block a user