cast's subexpression even if the cast itself has no effect.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47335
91177308-0d34-0410-b5e6-
96231b3b80d8
void GRExprEngine::VisitCast(Expr* CastE, Expr* E, NodeTy* Pred, NodeSet& Dst) {
- QualType T = CastE->getType();
+ NodeSet S1;
+ Visit(E, Pred, S1);
+ QualType T = CastE->getType();
+
// Check for redundant casts or casting to "void"
if (T->isVoidType() ||
E->getType() == T ||
(T->isPointerType() && E->getType()->isFunctionType())) {
- Dst.Add(Pred);
+
+ for (NodeSet::iterator I1=S1.begin(), E1=S1.end(); I1 != E1; ++I1)
+ Dst.Add(*I1);
+
return;
}
- NodeSet S1;
- Visit(E, Pred, S1);
-
for (NodeSet::iterator I1=S1.begin(), E1=S1.end(); I1 != E1; ++I1) {
NodeTy* N = *I1;
StateTy St = N->getState();