summaryrefslogtreecommitdiffstats
path: root/test/SemaCXX/typo-correction-delayed.cpp
diff options
context:
space:
mode:
authorKaelyn Takata <rikka@google.com>2015-05-02 00:49:18 +0000
committerKaelyn Takata <rikka@google.com>2015-05-02 00:49:18 +0000
commitd19902c37b37ad122e0913055fd751231f16ea25 (patch)
tree829df7ce081af3a5e0ed63da48bf3cdb04f14568 /test/SemaCXX/typo-correction-delayed.cpp
parent37d785b4dc8dc055879a81f7b9bd8fb9ffcb835c (diff)
Diagnose delayed typos when parsing a postfix expression with an
unmatched l_paren before setting the LHS to ExprError(). Fixes PR23285. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@236371 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/typo-correction-delayed.cpp')
-rw-r--r--test/SemaCXX/typo-correction-delayed.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/SemaCXX/typo-correction-delayed.cpp b/test/SemaCXX/typo-correction-delayed.cpp
index dfdd9af811..121863d172 100644
--- a/test/SemaCXX/typo-correction-delayed.cpp
+++ b/test/SemaCXX/typo-correction-delayed.cpp
@@ -203,3 +203,9 @@ namespace PR23350 {
int z = 1 ? N : ; // expected-error {{expected expression}}
// expected-error-re@-1 {{use of undeclared identifier 'N'{{$}}}}
}
+
+// PR 23285. This test must be at the end of the file to avoid additional,
+// unwanted diagnostics.
+// expected-error-re@+2 {{use of undeclared identifier 'uintmax_t'{{$}}}}
+// expected-error@+1 {{expected ';' after top level declarator}}
+unsigned int a = 0(uintmax_t