Author: lattner
Date: Sun May 3 01:50:40 2009
New Revision: 70668
URL: http://llvm.org/viewvc/llvm-project?rev=70668&view=rev
Log:
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.
Modified:
cfe/trunk/lib/Sema/SemaStmt.cpp
Modified: cfe/trunk/lib/Sema/SemaStmt.cpp
URL:
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaStmt.cpp?rev=70668&r1=70667&r2=70668&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaStmt.cpp (original)
+++ cfe/trunk/lib/Sema/SemaStmt.cpp Sun May 3 01:50:40 2009
@@ -1040,7 +1040,7 @@
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 @@
continue;
}
- Diag(InputExpr->getSubExpr()->getLocStart(),
+ Diag(InputExpr->getLocStart(),
diag::err_asm_tying_incompatible_types)
<< InTy << OutTy << OutputExpr->getSourceRange()
<< InputExpr->getSourceRange();
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits