diff options
author | Kaelyn Takata <rikka@google.com> | 2015-05-01 20:59:18 +0000 |
---|---|---|
committer | Kaelyn Takata <rikka@google.com> | 2015-05-01 20:59:18 +0000 |
commit | a8dfd33611f978e3b78e5175ee4b55618ec00c1e (patch) | |
tree | 8393b8f36fa7f0d7189505d12fad9a66743cfafb /clang/test | |
parent | 9df2fa261b66933cf0f3f8882e5ea0eee9fbc075 (diff) | |
download | bcm5719-llvm-a8dfd33611f978e3b78e5175ee4b55618ec00c1e.tar.gz bcm5719-llvm-a8dfd33611f978e3b78e5175ee4b55618ec00c1e.zip |
Also correct typos in the middle of a ternary expression when the RHS is invalid.
The LHS was already being corrected before being set to ExprError when
the RHS is invalid, but when it was present the middle of a ternary
expression would be dropped in the error paths.
Fixes PR23350.
llvm-svn: 236347
Diffstat (limited to 'clang/test')
-rw-r--r-- | clang/test/SemaCXX/typo-correction-delayed.cpp | 5 |
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 3866a8a4cb7..dfdd9af811b 100644 --- a/clang/test/SemaCXX/typo-correction-delayed.cpp +++ b/clang/test/SemaCXX/typo-correction-delayed.cpp @@ -198,3 +198,8 @@ namespace PR23005 { void f() { int a = Unknown::b(c); } // expected-error {{use of undeclared identifier 'Unknown'}} // expected-error@-1 {{use of undeclared identifier 'c'}} } + +namespace PR23350 { +int z = 1 ? N : ; // expected-error {{expected expression}} +// expected-error-re@-1 {{use of undeclared identifier 'N'{{$}}}} +} |