[PATCH] D38342: [C++] Parse (sub) postfix expression after boolean literal

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 28 13:03:01 PDT 2017


aaron.ballman added inline comments.


================
Comment at: test/CXX/expr/expr.post/expr.sub/p1.cpp:3-6
+void pr34273() {
+  char Normal = "clang"[true]; // expected-no-diagnostics
+  char Special = true["clang"]; // expected-no-diagnostics
+}
----------------
I think this test should be added to test/Parser/ instead of CXX; this does not really appertain to [expr.sub]p1, which is more about the semantics than the parsing.


================
Comment at: test/CXX/expr/expr.post/expr.sub/p1.cpp:4-5
+void pr34273() {
+  char Normal = "clang"[true]; // expected-no-diagnostics
+  char Special = true["clang"]; // expected-no-diagnostics
+}
----------------
The "expected-no-diagnostics" comment should be right below the RUN line, and you only need it once.


https://reviews.llvm.org/D38342





More information about the cfe-commits mailing list