mirror of
https://github.com/github/codeql.git
synced 2026-04-28 02:05:14 +02:00
C++: Add MaD model for 'CSimpleMap'.
This commit is contained in:
12
cpp/ql/lib/ext/CSimpleMap.model.yml
Normal file
12
cpp/ql/lib/ext/CSimpleMap.model.yml
Normal file
@@ -0,0 +1,12 @@
|
||||
extensions:
|
||||
- addsTo:
|
||||
pack: codeql/cpp-all
|
||||
extensible: summaryModel
|
||||
data: # namespace, type, subtypes, name, signature, ext, input, output, kind, provenance
|
||||
- ["", "CSimpleMap", True, "Add", "", "", "Argument[*@1]", "Argument[-1].Element[@]", "value", "manual"]
|
||||
- ["", "CSimpleMap", True, "GetValueAt", "", "", "Argument[-1].Element[@]", "ReturnValue[*@]", "taint", "manual"]
|
||||
- ["", "CSimpleMap", True, "Lookup", "", "", "Argument[-1].Element[@]", "ReturnValue.Element[@]", "value", "manual"]
|
||||
- ["", "CSimpleMap", True, "SetAt", "", "", "Argument[*@1]", "Argument[-1].Element[@]", "value", "manual"]
|
||||
- ["", "CSimpleMap", True, "SetAtIndex", "", "", "Argument[*@2]", "Argument[-1].Element[@]", "value", "manual"]
|
||||
- ["", "CSimpleMap", True, "operator[]", "", "", "Argument[-1].Element[@]", "ReturnValue[*@]", "value", "manual"]
|
||||
- ["", "CSimpleMap", True, "operator=", "", "", "Argument[*0].Element[@]", "Argument[-1].Element[@]", "value", "manual"]
|
||||
@@ -779,7 +779,7 @@ void test_CSimpleMap() {
|
||||
{
|
||||
CSimpleMap<char*, wchar_t*> a;
|
||||
a.Add("hello", x);
|
||||
sink(a.Lookup("hello")); // $ MISSING: ir
|
||||
sink(a.Lookup("hello")); // $ ir
|
||||
}
|
||||
{
|
||||
CSimpleMap<char*, wchar_t*> a;
|
||||
@@ -800,11 +800,11 @@ void test_CSimpleMap() {
|
||||
{
|
||||
CSimpleMap<char*, wchar_t*> a;
|
||||
a.SetAt("hello", x);
|
||||
sink(a.Lookup("hello")); // $ MISSING: ir
|
||||
sink(a.Lookup("hello")); // $ ir
|
||||
}
|
||||
{
|
||||
CSimpleMap<char*, wchar_t*> a;
|
||||
a.SetAtIndex(0, "hello", x);
|
||||
sink(a.Lookup("hello")); // $ MISSING: ir
|
||||
sink(a.Lookup("hello")); // $ ir
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user