[cfe-commits] r146683 - in /cfe/trunk/lib/StaticAnalyzer/Core: SValBuilder.cpp SimpleSValBuilder.cpp Store.cpp
Anna Zaks
ganna at apple.com
Thu Dec 15 13:33:27 PST 2011
Author: zaks
Date: Thu Dec 15 15:33:26 2011
New Revision: 146683
URL: http://llvm.org/viewvc/llvm-project?rev=146683&view=rev
Log:
[analyzer] Address Jordy's comments for r145985.
Modified:
cfe/trunk/lib/StaticAnalyzer/Core/SValBuilder.cpp
cfe/trunk/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp
cfe/trunk/lib/StaticAnalyzer/Core/Store.cpp
Modified: cfe/trunk/lib/StaticAnalyzer/Core/SValBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/SValBuilder.cpp?rev=146683&r1=146682&r2=146683&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/SValBuilder.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/SValBuilder.cpp Thu Dec 15 15:33:26 2011
@@ -327,9 +327,5 @@
return R ? SVal(loc::MemRegionVal(R)) : UnknownVal();
}
- // Check for casts from integers to integers.
- if (castTy->isIntegerType() && originalTy->isIntegerType())
- return dispatchCast(val, castTy);
-
return dispatchCast(val, castTy);
}
Modified: cfe/trunk/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp?rev=146683&r1=146682&r2=146683&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp Thu Dec 15 15:33:26 2011
@@ -58,9 +58,10 @@
// Transfer function for Casts.
//===----------------------------------------------------------------------===//
-SVal SimpleSValBuilder::dispatchCast(SVal val, QualType castTy) {
- return isa<Loc>(val) ? evalCastFromLoc(cast<Loc>(val), castTy)
- : evalCastFromNonLoc(cast<NonLoc>(val), castTy);
+SVal SimpleSValBuilder::dispatchCast(SVal Val, QualType CastTy) {
+ assert(isa<Loc>(&Val) || isa<NonLoc>(&Val));
+ return isa<Loc>(Val) ? evalCastFromLoc(cast<Loc>(Val), CastTy)
+ : evalCastFromNonLoc(cast<NonLoc>(Val), CastTy);
}
SVal SimpleSValBuilder::evalCastFromNonLoc(NonLoc val, QualType castTy) {
Modified: cfe/trunk/lib/StaticAnalyzer/Core/Store.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/Store.cpp?rev=146683&r1=146682&r2=146683&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/Store.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/Store.cpp Thu Dec 15 15:33:26 2011
@@ -227,7 +227,6 @@
return V;
}
- assert(isa<Loc>(&V) || isa<NonLoc>(&V));
return svalBuilder.dispatchCast(V, castTy);
}
More information about the cfe-commits
mailing list