[PATCH] D38342: [C++] Parse (sub) postfix expression after boolean literal
Nicolas Lesser via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 28 13:50:53 PDT 2017
Rakete1111 updated this revision to Diff 117051.
Rakete1111 added a comment.
- Moved test to test/CXX/
Do I actually need to -verify the test if no diagnostics are expected?
Thanks @aaron.ballman
https://reviews.llvm.org/D38342
Files:
lib/Parse/ParseExpr.cpp
test/Parser/cxx-bool.cpp
Index: test/Parser/cxx-bool.cpp
===================================================================
--- test/Parser/cxx-bool.cpp
+++ test/Parser/cxx-bool.cpp
@@ -2,3 +2,9 @@
bool a = true;
bool b = false;
+
+namespace pr34273 {
+ char c = "clang"[true];
+ char d = true["clang"];
+}
+
Index: lib/Parse/ParseExpr.cpp
===================================================================
--- lib/Parse/ParseExpr.cpp
+++ lib/Parse/ParseExpr.cpp
@@ -798,7 +798,8 @@
case tok::kw_true:
case tok::kw_false:
- return ParseCXXBoolLiteral();
+ Res = ParseCXXBoolLiteral();
+ break;
case tok::kw___objc_yes:
case tok::kw___objc_no:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38342.117051.patch
Type: text/x-patch
Size: 653 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170928/0d3338f1/attachment.bin>
More information about the cfe-commits
mailing list