This revision was automatically updated to reflect the committed changes.
Closed by commit rL265381: Consolidate and improve the handling of built-in
feature-like macros (authored by AndyG).
Changed prior to commit:
http://reviews.llvm.org/D17149?vs=52535&id=52664#toc
Repository:
rL LLVM
ht
rsmith accepted this revision.
rsmith added a reviewer: rsmith.
This revision is now accepted and ready to land.
Comment at: lib/Lex/PPMacroExpansion.cpp:1489-1492
@@ +1488,6 @@
+// a diagnostic and a dummy value.
+if (Result.hasValue())
+ OS << Result.get
AndyG updated this revision to Diff 52535.
AndyG marked 5 inline comments as done.
AndyG added a comment.
Implemented comments.
http://reviews.llvm.org/D17149
Files:
include/clang/Basic/DiagnosticLexKinds.td
lib/Lex/PPMacroExpansion.cpp
test/Preprocessor/feature_tests.c
test/Preprocesso
AndyG added inline comments.
Comment at: lib/Lex/PPMacroExpansion.cpp:1456-1457
@@ +1455,4 @@
+
+// Parse next non-comment, non-annotation token.
+do PP.LexUnexpandedNonComment(Tok); while (Tok.isAnnotation());
+
rsmith wrote:
> If we get an annotation tok
rsmith added inline comments.
Comment at: lib/Lex/PPMacroExpansion.cpp:1430-1432
@@ +1429,5 @@
+Preprocessor &PP,
+int(*Op)(Token &Tok,
+ Pre
AndyG updated this revision to Diff 52513.
AndyG added a comment.
Ok, I've removed support for nested parentheses. Can this go through now?
Thanks.
http://reviews.llvm.org/D17149
Files:
include/clang/Basic/DiagnosticLexKinds.td
lib/Lex/PPMacroExpansion.cpp
test/Preprocessor/feature_test
AndyG added a comment.
Second bump :o)
http://reviews.llvm.org/D17149
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
AndyG added a comment.
Bump :o)
http://reviews.llvm.org/D17149
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
AndyG added a comment.
To be honest, the simple answer is because it was just as easy to do with
nesting as without (the code would still need to track the appearance of left
and right parentheses in order to correctly parse to the closing
right-parenthesis of the macro invocation in any case).
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_featureX))
AndyG added a comment.
Test comment -- just to see whether email notifications are sending properly
(it seems, for example, that cfe-commits wasn't notified of this patch...)
http://reviews.llvm.org/D17149
___
cfe-commits mailing list
cfe-commits@l
11 matches
Mail list logo