diff options
author | Nuno Lopes <nunoplopes@sapo.pt> | 2012-07-13 20:48:52 +0000 |
---|---|---|
committer | Nuno Lopes <nunoplopes@sapo.pt> | 2012-07-13 20:48:52 +0000 |
commit | e61e9dbf733f2414fe38d7ec3e7138e78a0a65a9 (patch) | |
tree | 7a0e3bc6b56ba39daf617fee2739e4b048bb8f76 /clang/lib/AST/ExprConstant.cpp | |
parent | 72db6d04e1a5ba73de7bb08db526cdef2d49cb6e (diff) | |
download | bcm5719-llvm-e61e9dbf733f2414fe38d7ec3e7138e78a0a65a9.tar.gz bcm5719-llvm-e61e9dbf733f2414fe38d7ec3e7138e78a0a65a9.zip |
add support for conditional expressions in Expr::HasSideEffects()
This fixes a bug in __builtin_object_size() codegen
llvm-svn: 160191
Diffstat (limited to 'clang/lib/AST/ExprConstant.cpp')
-rw-r--r-- | clang/lib/AST/ExprConstant.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp index ad5aa54e483..eb34fc5fcad 100644 --- a/clang/lib/AST/ExprConstant.cpp +++ b/clang/lib/AST/ExprConstant.cpp @@ -2323,6 +2323,9 @@ public: { return Visit(E->getLHS()) || Visit(E->getRHS()); } bool VisitChooseExpr(const ChooseExpr *E) { return Visit(E->getChosenSubExpr(Ctx)); } + bool VisitAbstractConditionalOperator(const AbstractConditionalOperator *E) + { return Visit(E->getCond()) || Visit(E->getTrueExpr()) + || Visit(E->getFalseExpr()); } bool VisitCastExpr(const CastExpr *E) { return Visit(E->getSubExpr()); } bool VisitBinAssign(const BinaryOperator *E) { return true; } bool VisitCompoundAssignOperator(const BinaryOperator *E) { return true; } |