summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaStmt.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-05-03 06:50:40 +0000
committerChris Lattner <sabre@nondot.org>2009-05-03 06:50:40 +0000
commit28b05c82494ad6bb4685324209c8dbd7f71f83eb (patch)
treea0d1899258c688f6e8eb0428a290e8d3091788ee /clang/lib/Sema/SemaStmt.cpp
parent4b59ccb563e074352cb8efd7d36462b6d7b162c5 (diff)
downloadbcm5719-llvm-28b05c82494ad6bb4685324209c8dbd7f71f83eb.tar.gz
bcm5719-llvm-28b05c82494ad6bb4685324209c8dbd7f71f83eb.zip
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
Diffstat (limited to 'clang/lib/Sema/SemaStmt.cpp')
-rw-r--r--clang/lib/Sema/SemaStmt.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaStmt.cpp b/clang/lib/Sema/SemaStmt.cpp
index ac5cef10f42..02f6840415c 100644
--- a/clang/lib/Sema/SemaStmt.cpp
+++ b/clang/lib/Sema/SemaStmt.cpp
@@ -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();
OpenPOWER on IntegriCloud