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 | f195f2cacf149286232d66578fad3370efa5f567 (patch) | |
tree | 0d3eb52e1a7281be1d85c0af80b461137c1a1858 /lib/AST/ExprConstant.cpp | |
parent | 916ea6522a200c4a3a4f5eecd29ee7bea315be5f (diff) |
add support for conditional expressions in Expr::HasSideEffects()
This fixes a bug in __builtin_object_size() codegen
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160191 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/ExprConstant.cpp')
-rw-r--r-- | lib/AST/ExprConstant.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/AST/ExprConstant.cpp b/lib/AST/ExprConstant.cpp index ad5aa54e48..eb34fc5fca 100644 --- a/lib/AST/ExprConstant.cpp +++ b/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; } |