C++: Add models for 'std::thread' and accept test changes.

This commit is contained in:
Mathias Vorreiter Pedersen
2025-07-10 12:45:20 +01:00
parent 2062a774fc
commit 89cf215ebb
2 changed files with 14 additions and 3 deletions

View File

@@ -0,0 +1,11 @@
extensions:
- addsTo:
pack: codeql/cpp-all
extensible: summaryModel
data: # namespace, type, subtypes, name, signature, ext, input, output, kind, provenance
- ["std", "thread", True, "thread", "", "", "Argument[*@1]", "Argument[0].Parameter[@0]", "value", "manual"]
- ["std", "thread", True, "thread", "", "", "Argument[*@2]", "Argument[0].Parameter[@1]", "value", "manual"]
- ["std", "thread", True, "thread", "", "", "Argument[*@3]", "Argument[0].Parameter[@2]", "value", "manual"]
- ["std", "thread", True, "thread", "", "", "Argument[*@4]", "Argument[0].Parameter[@3]", "value", "manual"]
- ["std", "thread", True, "thread", "", "", "Argument[*@5]", "Argument[0].Parameter[@4]", "value", "manual"]

View File

@@ -8,15 +8,15 @@ struct S {
};
void thread_function_1(S* s) {
sink(s->x); // $ MISSING: ir
sink(s->x); // $ ir
}
void thread_function_2(S s) {
sink(s.x); // $ MISSING: ir
sink(s.x); // $ ir
}
void thread_function_3(S* s, int y) {
sink(s->x); // $ MISSING: ir
sink(s->x); // $ ir
sink(y); // clean
}