mirror of
https://github.com/github/codeql.git
synced 2025-12-17 09:13:20 +01:00
This trick for excluding elements from macro bodies but not macro arguments looks promising and should probably be used much more. With this commit, it's now easy to use from any query. Performance is still good because the new predicate gets appropriately magiced.
10 lines
133 B
C++
10 lines
133 B
C++
// This is the example from the QLDoc of `isFromMacroDefinition`.
|
|
|
|
void f(int);
|
|
|
|
#define M(x) f(x)
|
|
|
|
void useM(int y) {
|
|
M(y + 1);
|
|
}
|