summaryrefslogtreecommitdiffstats
path: root/clang/test
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
commit92565b51aa25b7a15bcdfb628bc616866af194fb (patch)
tree05f54ec9e49a853309bde9a4c13812e62723749f /clang/test
parent821880a7a10b67816c8599eda21797addb88c4a3 (diff)
downloadbcm5719-llvm-92565b51aa25b7a15bcdfb628bc616866af194fb.tar.gz
bcm5719-llvm-92565b51aa25b7a15bcdfb628bc616866af194fb.zip
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. llvm-svn: 233347
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/SemaCXX/typo-correction-delayed.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/typo-correction-delayed.cpp b/clang/test/SemaCXX/typo-correction-delayed.cpp
index 64e6dd5966a..3866a8a4cb7 100644
--- a/clang/test/SemaCXX/typo-correction-delayed.cpp
+++ b/clang/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'}}
+}
OpenPOWER on IntegriCloud