Files
codeql/cpp/ql/test/library-tests/syntax-zoo/array_delete.cpp
Jeroen Ketema ee19c3d80f C++: Rename identically named classes in syntax-zoo
Conceptually the test that comprises the whole of `syntax-zoo` forms one
single binary. To this binary ODR applies. There were two class definitions
`Foo` in `syntax-zoo`, violating ODR. Rename those classes to have different
names.
2023-01-17 19:02:40 +01:00

8 lines
90 B
C++

struct ArrayDelete {
~ArrayDelete();
};
void f() {
delete[] (ArrayDelete*)nullptr;
}