forked from OSchip/llvm-project
Handle delayed corrections in a couple more error paths in ParsePostfixExpressionSuffix.
llvm-svn: 223209
This commit is contained in:
parent
120a0c92f4
commit
53ac6a04eb
|
@ -1390,6 +1390,7 @@ Parser::ParsePostfixExpressionSuffix(ExprResult LHS) {
|
|||
SourceLocation OpenLoc = ConsumeToken();
|
||||
|
||||
if (ParseSimpleExpressionList(ExecConfigExprs, ExecConfigCommaLocs)) {
|
||||
(void)Actions.CorrectDelayedTyposInExpr(LHS);
|
||||
LHS = ExprError();
|
||||
}
|
||||
|
||||
|
@ -1440,6 +1441,7 @@ Parser::ParsePostfixExpressionSuffix(ExprResult LHS) {
|
|||
if (Tok.isNot(tok::r_paren)) {
|
||||
if (ParseExpressionList(ArgExprs, CommaLocs, &Sema::CodeCompleteCall,
|
||||
LHS.get())) {
|
||||
(void)Actions.CorrectDelayedTyposInExpr(LHS);
|
||||
LHS = ExprError();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -106,3 +106,9 @@ void f(int *i) {
|
|||
const int DefaultArg = 9; // expected-note {{'DefaultArg' declared here}}
|
||||
template <int I = defaultArg> struct S {}; // expected-error {{use of undeclared identifier 'defaultArg'; did you mean 'DefaultArg'?}}
|
||||
S<1> s;
|
||||
|
||||
namespace foo {}
|
||||
void test_paren_suffix() {
|
||||
foo::bar({5, 6}); // expected-error-re {{no member named 'bar' in namespace 'foo'{{$}}}} \
|
||||
// expected-error {{expected expression}}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue