[PATCH] D53866: [Preamble] Stop circular inclusion of main file when building preamble
Jan Wassenberg via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 5 08:40:48 PST 2020
jan-wassenberg added a comment.
@nik here's an unusual but real-world example that triggers this.
https://github.com/google/highway compiles the same source multiple times (with different macros set) for generating code for multiple SIMD instruction sets.
The main source file sets a macro to its filename and includes a "foreach_target.h" which includes the file identified by that macro.
I understand this is complicated for analysis, so foreach_target.h does nothing if it detects that an IDE/analyzer are parsing. This relies on predefined macros such as
__CDT_PARSER__ __INTELLISENSE__ Q_CREATOR_RUN. Is there such a macro for clangd?
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D53866/new/
https://reviews.llvm.org/D53866
More information about the cfe-commits
mailing list