Files
codeql/cpp/ql/test/library-tests/dataflow/fields/C.cpp
Owen Mansel-Chan badfa1a5c5 C++: Inline expectation should have space after $
This was a regex-find-replace from `// \$(?! )` (using a negative lookahead) to `// $ `.
2026-03-04 12:45:00 +00:00

36 lines
464 B
C++

void sink(...);
class C
{
class Elem
{
};
private:
Elem *s1 = new Elem();
const Elem *s2 = new Elem();
Elem *s3;
public:
const static Elem *s4;
void main(void)
{
C *c = new C();
c->func();
}
C() : s1(new Elem())
{
this->s3 = new Elem();
}
void func()
{
sink(s1); // $ ast,ir
sink(s2); // $ MISSING: ast,ir
sink(s3); // $ ast,ir
sink(s4); // $ MISSING: ast,ir
}
};
const C::Elem *C::s4 = new Elem();