mirror of
https://github.com/github/codeql.git
synced 2026-05-03 12:45:27 +02:00
C++: Silence some more bogus consistency errors in syntax zoo
These were due to several functions occurring that would have the same TRAP key. By making the functions static or wrapping the defining class in an anonymous namespace the TRAP keys will differ from each other.
This commit is contained in:
@@ -138,7 +138,7 @@ namespace synthetic_dtor_calls {
|
||||
// This function is interesting because its extractor CFG has unreachable
|
||||
// calls to `c2.~C()` and `c3.~C()`. It's the calls that would have come from
|
||||
// leaving the block of `c2` by falling off the end, but no path does that.
|
||||
int g(int x) {
|
||||
static int g(int x) {
|
||||
do {
|
||||
C c1;
|
||||
if (x > 0) {
|
||||
|
||||
Reference in New Issue
Block a user