summaryrefslogtreecommitdiffstats
path: root/test/SemaCXX/typo-correction-delayed.cpp
diff options
context:
space:
mode:
authorKaelyn Takata <rikka@google.com>2015-01-07 21:16:39 +0000
committerKaelyn Takata <rikka@google.com>2015-01-07 21:16:39 +0000
commitd255266a066331d8d7d0808c0e0bc0cda33d647e (patch)
tree3e1a54410daa4c6d761462ba2636a5214f709039 /test/SemaCXX/typo-correction-delayed.cpp
parent044c7319f6df1f755647c4b76b421d0e20a2cbe3 (diff)
Handle OpaqueValueExprs more intelligently in the TransformTypos tree
transform. Also diagnose typos in the initializer of an invalid C++ declaration. Both issues were hit using the same line of test code, depending on whether the code was treated as C or C++. Fixes PR22092. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@225389 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 49bb14fe8c..e028faad25 100644
--- a/test/SemaCXX/typo-correction-delayed.cpp
+++ b/test/SemaCXX/typo-correction-delayed.cpp
@@ -152,3 +152,8 @@ namespace PR21947 {
int blue; // expected-note {{'blue' declared here}}
__typeof blur y; // expected-error {{use of undeclared identifier 'blur'; did you mean 'blue'?}}
}
+
+namespace PR22092 {
+a = b ? : 0; // expected-error {{C++ requires a type specifier for all declarations}} \
+ // expected-error-re {{use of undeclared identifier 'b'{{$}}}}
+}