[PATCH] D17149: Consolidate and improve the handling of built-in feature-like macros

Richard Smith via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 11 17:24:49 PST 2016


rsmith added a subscriber: rsmith.

================
Comment at: lib/Lex/PPMacroExpansion.cpp:1438-1440
@@ -1432,3 +1437,5 @@
 
-  // Get the module name.
-  PP.LexNonComment(Tok);
+  // It is possible that the macro invocation has a multiple-nested argument,
+  // for example: __has_feature((((X)))).  This should be counted as valid and
+  // parsed correctly.
+  SmallVector<SourceLocation, 2> ParenStack;
----------------
Why should this be treated as valid? That's not part of the specification for these features.


http://reviews.llvm.org/D17149





More information about the cfe-commits mailing list