forked from OSchip/llvm-project
Correct delayed typos in the operand to typeof expressions.
Fixes PR21947. llvm-svn: 224558
This commit is contained in:
parent
97f7685516
commit
9112607400
|
@ -5932,8 +5932,8 @@ void Parser::ParseTypeofSpecifier(DeclSpec &DS) {
|
|||
bool isCastExpr;
|
||||
ParsedType CastTy;
|
||||
SourceRange CastRange;
|
||||
ExprResult Operand = ParseExprAfterUnaryExprOrTypeTrait(OpTok, isCastExpr,
|
||||
CastTy, CastRange);
|
||||
ExprResult Operand = Actions.CorrectDelayedTyposInExpr(
|
||||
ParseExprAfterUnaryExprOrTypeTrait(OpTok, isCastExpr, CastTy, CastRange));
|
||||
if (hasParens)
|
||||
DS.setTypeofParensRange(CastRange);
|
||||
|
||||
|
|
|
@ -147,3 +147,8 @@ void test() {
|
|||
namespace PR21905 {
|
||||
int (*a) () = (void)Z; // expected-error-re {{use of undeclared identifier 'Z'{{$}}}}
|
||||
}
|
||||
|
||||
namespace PR21947 {
|
||||
int blue; // expected-note {{'blue' declared here}}
|
||||
__typeof blur y; // expected-error {{use of undeclared identifier 'blur'; did you mean 'blue'?}}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue