diff options
Diffstat (limited to 'lib/Analysis/GRExprEngine.cpp')
-rw-r--r-- | lib/Analysis/GRExprEngine.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/Analysis/GRExprEngine.cpp b/lib/Analysis/GRExprEngine.cpp index 35facb35ae..423c4850d8 100644 --- a/lib/Analysis/GRExprEngine.cpp +++ b/lib/Analysis/GRExprEngine.cpp @@ -1432,6 +1432,15 @@ void GRExprEngine::VisitCast(Expr* CastE, Expr* Ex, NodeTy* Pred, NodeSet& Dst){ MakeNode(Dst, CastE, N, SetRVal(St, CastE, V)); continue; } + + // For const casts, just propagate the value. + ASTContext& C = getContext(); + + if (C.getCanonicalType(T).getUnqualifiedType() == + C.getCanonicalType(ExTy).getUnqualifiedType()) { + MakeNode(Dst, CastE, N, SetRVal(St, CastE, V)); + continue; + } // Check for casts from pointers to integers. if (T->isIntegerType() && LVal::IsLValType(ExTy)) { |