[cfe-commits] r56368 - /cfe/trunk/lib/Analysis/GRExprEngine.cpp
Ted Kremenek
kremenek at apple.com
Fri Sep 19 13:51:22 PDT 2008
Author: kremenek
Date: Fri Sep 19 15:51:22 2008
New Revision: 56368
URL: http://llvm.org/viewvc/llvm-project?rev=56368&view=rev
Log:
Bug fix: for the base transfer function logic for casts, handle const casts as just propagating the value.
Modified:
cfe/trunk/lib/Analysis/GRExprEngine.cpp
Modified: cfe/trunk/lib/Analysis/GRExprEngine.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/GRExprEngine.cpp?rev=56368&r1=56367&r2=56368&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/GRExprEngine.cpp (original)
+++ cfe/trunk/lib/Analysis/GRExprEngine.cpp Fri Sep 19 15:51:22 2008
@@ -1432,6 +1432,15 @@
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)) {
More information about the cfe-commits
mailing list