CodeQL library for C/C++
codeql/cpp-all 1.1.0 (changelog, source)

Member predicate MacroInvocation::getAGeneratedElement

Gets an element that is either completely in the macro expansion, or (if it is a statement) ‘almost’ in the macro expansion (for instance up to a trailing semicolon). Useful for common patterns in which macros are almost syntactically complete elements but not quite.

Locatable getAGeneratedElement()