diff options
-rw-r--r-- | clang/lib/Parse/ParseExpr.cpp | 3 | ||||
-rw-r--r-- | clang/test/SemaCXX/typo-correction-delayed.cpp | 5 |
2 files changed, 8 insertions, 0 deletions
diff --git a/clang/lib/Parse/ParseExpr.cpp b/clang/lib/Parse/ParseExpr.cpp index b9127e90457..72af14d068f 100644 --- a/clang/lib/Parse/ParseExpr.cpp +++ b/clang/lib/Parse/ParseExpr.cpp @@ -1459,6 +1459,9 @@ Parser::ParsePostfixExpressionSuffix(ExprResult LHS) { })) { (void)Actions.CorrectDelayedTyposInExpr(LHS); LHS = ExprError(); + } else if (LHS.isInvalid()) { + for (auto &E : ArgExprs) + Actions.CorrectDelayedTyposInExpr(E); } } } 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'}} +} |