[PATCH] D34263: [preprocessor] When preprocessor option 'SingleFileParseMode' is enabled, parse all directive blocks if the condition uses undefined macros

Manuel Klimek via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 19 01:20:30 PDT 2017


klimek added a comment.

Generally this patch lg from my side - how many patches for single file mode are coming down the road, though? I'm somewhat concerned about the overall complexity it'll add to clang.
When I saw your first patch my reaction was "wow, this works with this little change - cool".
With this patch it's "well, that doesn't seem to add too much complexity, so looks good".
I don't want to realize 5 patches down the line that we're sprinkling all of clang with single file conditional code without some discussion about the strategy with Richard.



================
Comment at: include/clang/Lex/Preprocessor.h:1838-1841
+  struct DirectiveEvalResult {
+    bool Conditional;
+    bool IncludedUndefinedIds;
+  };
----------------
A short comment on the struct what the semantics are would be helpful.


https://reviews.llvm.org/D34263





More information about the cfe-commits mailing list