CPP: Add recommended test.

This commit is contained in:
Geoffrey White
2018-11-19 14:25:11 +00:00
parent 27fe996269
commit 6a14748af8

View File

@@ -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]
}