mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
C++: Add models for 'std::thread' and accept test changes.
This commit is contained in:
11
cpp/ql/lib/ext/std.thread.model.yml
Normal file
11
cpp/ql/lib/ext/std.thread.model.yml
Normal 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"]
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user