forked from OSchip/llvm-project
avoid a crash when we encounter a implicit cast of the paren expr due to
promotions. This should be fixed by not modeling asm operands (which require the ()'s according to the grammar) as not being paren exprs. llvm-svn: 70668
This commit is contained in:
parent
4b59ccb563
commit
28b05c8249
|
@ -1040,7 +1040,7 @@ Sema::OwningStmtResult Sema::ActOnAsmStmt(SourceLocation AsmLoc,
|
|||
|
||||
unsigned TiedTo = Info.getTiedOperand();
|
||||
Expr *OutputExpr = Exprs[TiedTo];
|
||||
ParenExpr *InputExpr = cast<ParenExpr>(Exprs[i+NumOutputs]);
|
||||
Expr *InputExpr = Exprs[i+NumOutputs];
|
||||
QualType InTy = InputExpr->getType();
|
||||
QualType OutTy = OutputExpr->getType();
|
||||
if (Context.hasSameType(InTy, OutTy))
|
||||
|
@ -1057,7 +1057,7 @@ Sema::OwningStmtResult Sema::ActOnAsmStmt(SourceLocation AsmLoc,
|
|||
continue;
|
||||
}
|
||||
|
||||
Diag(InputExpr->getSubExpr()->getLocStart(),
|
||||
Diag(InputExpr->getLocStart(),
|
||||
diag::err_asm_tying_incompatible_types)
|
||||
<< InTy << OutTy << OutputExpr->getSourceRange()
|
||||
<< InputExpr->getSourceRange();
|
||||
|
|
Loading…
Reference in New Issue