summaryrefslogtreecommitdiffstats
path: root/test/SemaCXX/typo-correction-delayed.cpp
diff options
context:
space:
mode:
authorKaelyn Takata <rikka@google.com>2015-03-27 01:44:47 +0000
committerKaelyn Takata <rikka@google.com>2015-03-27 01:44:47 +0000
commit811a66afa268f33a9a6c4964ae84d52e37541548 (patch)
tree4453687daf099a415763044f478674a27c46f4f3 /test/SemaCXX/typo-correction-delayed.cpp
parent0b27aaf8c2594b9c631f75eec9ffd010db0b2a1d (diff)
Diagnose delayed typos in an expr list that is in an invalid expression.
Previously, if the expr list parsed fine but the expr to the left of the open parenthesis was invalid (when parsing the suffix of a postfix-expression), the parsed expr list was just ignored. Fixes PR23005. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@233347 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/typo-correction-delayed.cpp')
-rw-r--r--test/SemaCXX/typo-correction-delayed.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/SemaCXX/typo-correction-delayed.cpp b/test/SemaCXX/typo-correction-delayed.cpp
index 64e6dd5966..3866a8a4cb 100644
--- a/test/SemaCXX/typo-correction-delayed.cpp
+++ b/test/SemaCXX/typo-correction-delayed.cpp
@@ -193,3 +193,8 @@ void f() {
TimeTicks::now(); // expected-error {{no member named 'now' in 'PR22297::TimeTicks'; did you mean 'Now'?}}
}
}
+
+namespace PR23005 {
+void f() { int a = Unknown::b(c); } // expected-error {{use of undeclared identifier 'Unknown'}}
+// expected-error@-1 {{use of undeclared identifier 'c'}}
+}