mirror of
https://github.com/github/codeql.git
synced 2026-04-30 03:05:15 +02:00
CPP: Add recommended test.
This commit is contained in:
@@ -144,3 +144,9 @@ void useMarkRange(int offs) {
|
||||
markRange(buffer, offs, offs + 10);
|
||||
markRange(buffer, offs, offs); // GOOD (comparison is in the macro)
|
||||
}
|
||||
|
||||
#define MY_MACRO(x) (x)
|
||||
|
||||
void myMacroTest(int x) {
|
||||
MY_MACRO(x == x); // BAD [NOT DETECTED]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user