summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2012-01-31 01:19:57 +0000
committerTed Kremenek <kremenek@apple.com>2012-01-31 01:19:57 +0000
commitf8c36e005a32c9be7d7f27347f738c4dac9b5c09 (patch)
tree9005abcf4b01b83e71f2cd2efe659ff615542107 /clang/lib
parent7778e6d81868c7f23451f461e235b8a1cc068171 (diff)
downloadbcm5719-llvm-f8c36e005a32c9be7d7f27347f738c4dac9b5c09.tar.gz
bcm5719-llvm-f8c36e005a32c9be7d7f27347f738c4dac9b5c09.zip
Convert checker over to using ProgramStateRef.
llvm-svn: 149319
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/StaticAnalyzer/Checkers/ObjCContainersChecker.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/ObjCContainersChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/ObjCContainersChecker.cpp
index 8c8020be5cd..f781f0ab8af 100644
--- a/clang/lib/StaticAnalyzer/Checkers/ObjCContainersChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/ObjCContainersChecker.cpp
@@ -79,7 +79,7 @@ template<> struct ProgramStateTrait<ArraySizeMap>
void ObjCContainersChecker::addSizeInfo(const Expr *Array, const Expr *Size,
CheckerContext &C) const {
- const ProgramState *State = C.getState();
+ ProgramStateRef State = C.getState();
SVal SizeV = State->getSVal(Size, C.getLocationContext());
// Undefined is reported by another checker.
if (SizeV.isUnknownOrUndef())
@@ -124,7 +124,7 @@ void ObjCContainersChecker::checkPreStmt(const CallExpr *CE,
// Check the array access.
if (Name.equals("CFArrayGetValueAtIndex")) {
- const ProgramState *State = C.getState();
+ ProgramStateRef State = C.getState();
// Retrieve the size.
// Find out if we saw this array symbol before and have information about it.
const Expr *ArrayExpr = CE->getArg(0);
@@ -140,8 +140,8 @@ void ObjCContainersChecker::checkPreStmt(const CallExpr *CE,
// Now, check if 'Idx in [0, Size-1]'.
const QualType T = IdxExpr->getType();
- const ProgramState *StInBound = State->assumeInBound(Idx, Size, true, T);
- const ProgramState *StOutBound = State->assumeInBound(Idx, Size, false, T);
+ ProgramStateRef StInBound = State->assumeInBound(Idx, Size, true, T);
+ ProgramStateRef StOutBound = State->assumeInBound(Idx, Size, false, T);
if (StOutBound && !StInBound) {
ExplodedNode *N = C.generateSink(StOutBound);
if (!N)
OpenPOWER on IntegriCloud