[PATCH] D69731: [analyzer] CheckerContext: Make the Preprocessor available
Artem Dergachev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 1 14:43:13 PDT 2019
NoQ added a comment.
It sounds like the code is querying the temporary internal state of the preprocessor which is supposed to be queried during preprocessing, not after it. Say, `PP.isMacroDefined("__STDC_LIB_EXT1__")` clearly depends on the location, as a macro can be un-defined and re-defined as many times as possible. But it doesn't receive the location as an argument, so it's probably implied to be "the location that the preprocessor is currently preprocessing"(?) Like, i've no idea how does the `Preprocessor` class work, but the code clearly looks too primitive to solve the problem. Clang-Tidy's `PPCallbacks` subsystem looks much more realistic.
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D69731/new/
https://reviews.llvm.org/D69731
More information about the cfe-commits
mailing list