Files
codeql/cpp/ql/test/library-tests/preprocessor/preprocessor/preproc.ql
2018-08-02 17:53:23 +01:00

8 lines
406 B
Plaintext

import cpp
from Location loc, PreprocessorDirective pd, string head, string body
where loc = pd.getLocation()
and if exists(pd.getHead()) then head = pd.getHead() else head = "N/A"
and if pd instanceof Macro then body = ((Macro)pd).getBody() else body = "N/A"
select loc.getFile(), loc.getStartLine(), loc.getStartColumn(), loc.getEndLine(), loc.getEndColumn(), concat(pd.getAQlClass(), ", "), head, body