mirror of
https://github.com/github/codeql.git
synced 2026-05-05 05:35:13 +02:00
C++: Annotate field-flow tests in [ABC].cpp
This brings the annotation style in sync with how we annotate new tests these days. I also changed a few annotations to have different expected outcome based on my understanding of the code.
This commit is contained in:
@@ -7,7 +7,7 @@ class B
|
||||
Box1 *b1 = new Box1(e, nullptr);
|
||||
Box2 *b2 = new Box2(b1);
|
||||
sink(b2->box1->elem1); // flow
|
||||
sink(b2->box1->elem2); // FP due to flow in f2 below
|
||||
sink(b2->box1->elem2); // no flow [FALSE POSITIVE] (due to flow in f2 below)
|
||||
}
|
||||
|
||||
void f2()
|
||||
@@ -15,7 +15,7 @@ class B
|
||||
Elem *e = new B::Elem();
|
||||
Box1 *b1 = new B::Box1(nullptr, e);
|
||||
Box2 *b2 = new Box2(b1);
|
||||
sink(b2->box1->elem1); // FP due to flow in f1 above
|
||||
sink(b2->box1->elem1); // no flow [FALSE POSITIVE] (due to flow in f1 above)
|
||||
sink(b2->box1->elem2); // flow
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user