[PATCH] D58278: Prepare ground for re-lexing modular headers.
Alexander Kornienko via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 15 04:04:43 PST 2019
alexfh created this revision.
alexfh added reviewers: bkramer, klimek, rsmith.
Herald added subscribers: jdoerfert, jsji, kbarton, nemanjai.
Herald added a project: clang.
When a clang tool runs on a translation unit that uses modular headers, no
PPCallbacks will be invoked for the code in the modular headers (since they are
not parsed, but loaded as AST). Since some tools depend on PPCallbacks for all
transitively included headers, a solution is to re-lex the modular headers
from the sources stored along with AST inside module files. This patch makes it
possible to re-attach PPCallbacks from the compiler's Preprocessor to a custom
one that will be used to re-lex all transitively included headers. It also
updates clang-tidy checks to be compatible with this mode of operation.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D58278
Files:
clang-tools-extra/clang-tidy/bugprone/MacroParenthesesCheck.cpp
clang-tools-extra/clang-tidy/bugprone/MacroRepeatedSideEffectsCheck.cpp
clang-tools-extra/clang-tidy/google/AvoidUnderscoreInGoogletestNameCheck.cpp
clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp
clang-tools-extra/clang-tidy/readability/RedundantPreprocessorCheck.cpp
clang-tools-extra/clang-tidy/utils/HeaderGuard.cpp
clang/include/clang/Lex/PPCallbacks.h
clang/include/clang/Lex/Preprocessor.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58278.186990.patch
Type: text/x-patch
Size: 16285 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190215/d9052aa8/attachment-0001.bin>
More information about the cfe-commits
mailing list