This runs checks over a restricted subset of the TU:
- preprocessor callbacks just receive the truncated PP events that occur when a preamble is used.
- ASTMatchers run only over the top-level decls in the main-file
This patch just turns on one simple check (bugprone-sizeof-expression)
with no configuration.
- configuration is complex enough to warrant a separate patch
- arbitrary checks don't work well yet - there are various ways that checks can access the whole AST (and thus be incredibly slow). Most notably: the hasAncestor matcher, and using the ASTContext from check().
This depends on a small patch to ASTMatchers to run a MatchFinder on a
certain set of top-level declarations.
just want to make sure -- do we receive all preprocessor events in the main file when we use preamble? We have a few checks that generate #include insertion as part of FixIt.
TestTU doesn't use preamble, it would be nice to have a test running on a main file with a real preamble, but this can be a follow-up I think.