aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/PR21679.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/PR21679.cpp')
-rw-r--r--test/SemaCXX/PR21679.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/SemaCXX/PR21679.cpp b/test/SemaCXX/PR21679.cpp
new file mode 100644
index 000000000000..06db2bffdf6e
--- /dev/null
+++ b/test/SemaCXX/PR21679.cpp
@@ -0,0 +1,13 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+
+int w = z.; // expected-error {{use of undeclared identifier 'z'}} \
+ // expected-error {{expected unqualified-id}}
+
+int x = { y[ // expected-error {{use of undeclared identifier 'y'}} \
+ // expected-note {{to match this '['}} \
+ // expected-note {{to match this '{'}} \
+ // expected-error {{expected ';' after top level declarator}}
+
+// The errors below all occur on the last line of the file, so splitting them
+// among multiple lines doesn't work.
+// expected-error {{expected expression}} expected-error {{expected ']'}} expected-error {{expected '}'}}