llvm-project/clang/lib/Frontend/Rewrite
Lubos Lunak 533434fc72 make -frewrite-includes also rewrite conditions in #if/#elif
Those conditions may use __has_include, which needs to be rewritten.
The existing code has already tried to rewrite just __has_include,
but it didn't work with macro expansion, so e.g. Qt's
"#define QT_HAS_INCLUDE(x) __has_include(x)" didn't get handled
properly. Since the preprocessor run knows what each condition evaluates
to, just rewrite the entire condition. This of course requires that
the -frewrite-include pass has the same setup as the following
compilation, but that has always been the requirement.

Differential Revision: https://reviews.llvm.org/D63508

llvm-svn: 372248
2019-09-18 19:09:41 +00:00
..
CMakeLists.txt Attempt to fix shared library build: RewriteFrontend depends on Serialization after r305116. 2017-06-09 22:02:33 +00:00
FixItRewriter.cpp Rename F_{None,Text,Append} to OF_{None,Text,Append}. NFC 2019-08-05 05:43:48 +00:00
FrontendActions.cpp [Clang] Migrate llvm::make_unique to std::make_unique 2019-08-14 23:04:18 +00:00
HTMLPrint.cpp [Clang] Migrate llvm::make_unique to std::make_unique 2019-08-14 23:04:18 +00:00
InclusionRewriter.cpp make -frewrite-includes also rewrite conditions in #if/#elif 2019-09-18 19:09:41 +00:00
RewriteMacros.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
RewriteModernObjC.cpp [Clang] Migrate llvm::make_unique to std::make_unique 2019-08-14 23:04:18 +00:00
RewriteObjC.cpp [Clang] Migrate llvm::make_unique to std::make_unique 2019-08-14 23:04:18 +00:00
RewriteTest.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00