[cfe-commits] r85526 - /cfe/trunk/lib/AST/ExprConstant.cpp
Mike Stump
mrs at apple.com
Thu Oct 29 13:48:10 PDT 2009
Author: mrs
Date: Thu Oct 29 15:48:09 2009
New Revision: 85526
URL: http://llvm.org/viewvc/llvm-project?rev=85526&view=rev
Log:
Fix some issues Daniel pointed out.
Modified:
cfe/trunk/lib/AST/ExprConstant.cpp
Modified: cfe/trunk/lib/AST/ExprConstant.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ExprConstant.cpp?rev=85526&r1=85525&r2=85526&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ExprConstant.cpp (original)
+++ cfe/trunk/lib/AST/ExprConstant.cpp Thu Oct 29 15:48:09 2009
@@ -184,13 +184,14 @@
bool VisitCharacterLiteral(CharacterLiteral *E) { return false; }
bool VisitSizeOfAlignOfExpr(SizeOfAlignOfExpr *E) { return false; }
bool VisitArraySubscriptExpr(ArraySubscriptExpr *E)
- { return Visit(E->getLHS()) && Visit(E->getRHS()); }
+ { return Visit(E->getLHS()) || Visit(E->getRHS()); }
bool VisitChooseExpr(ChooseExpr *E)
{ return Visit(E->getChosenSubExpr(Info.Ctx)); }
bool VisitCastExpr(CastExpr *E) { return Visit(E->getSubExpr()); }
bool VisitBinAssign(BinaryOperator *E) { return true; }
bool VisitCompoundAssign(BinaryOperator *E) { return true; }
- bool VisitBinaryOperator(BinaryOperator *E) { return false; }
+ bool VisitBinaryOperator(BinaryOperator *E)
+ { return Visit(E->getLHS()) || Visit(E->getRHS()); }
bool VisitUnaryPreInc(UnaryOperator *E) { return true; }
bool VisitUnaryPostInc(UnaryOperator *E) { return true; }
bool VisitUnaryPreDec(UnaryOperator *E) { return true; }
@@ -198,7 +199,7 @@
bool VisitUnaryDeref(UnaryOperator *E) {
if (E->getType().isVolatileQualified())
return true;
- return false;
+ return Visit(E->getSubExpr());
}
bool VisitUnaryOperator(UnaryOperator *E) { return Visit(E->getSubExpr()); }
};
More information about the cfe-commits
mailing list