r226603 - Add the test that was supposed to be included with r223162.

Kaelyn Takata rikka at google.com
Tue Jan 20 12:15:30 PST 2015


Author: rikka
Date: Tue Jan 20 14:15:29 2015
New Revision: 226603

URL: http://llvm.org/viewvc/llvm-project?rev=226603&view=rev
Log:
Add the test that was supposed to be included with r223162.

The test case is based on the reduction from PR21679 and has to be
freestanding to work correctly, since some of the expected errors (and
some of the problems that were fixed) only occur when the end of the
file is reached.

Added:
    cfe/trunk/test/SemaCXX/PR21679.cpp

Added: cfe/trunk/test/SemaCXX/PR21679.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/PR21679.cpp?rev=226603&view=auto
==============================================================================
--- cfe/trunk/test/SemaCXX/PR21679.cpp (added)
+++ cfe/trunk/test/SemaCXX/PR21679.cpp Tue Jan 20 14:15:29 2015
@@ -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 '}'}}





More information about the cfe-commits mailing list