summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp
diff options
context:
space:
mode:
authorAnna Zaks <ganna@apple.com>2013-03-26 23:58:49 +0000
committerAnna Zaks <ganna@apple.com>2013-03-26 23:58:49 +0000
commitbd8f60d6d117eb782c61a559533a180d1b777e1e (patch)
treecd58bd8ef93bbec880b89004ff3962b48b0d181b /clang/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp
parent49ae6a7cf862ae4f8e6a838dd20faf372ff31efa (diff)
downloadbcm5719-llvm-bd8f60d6d117eb782c61a559533a180d1b777e1e.tar.gz
bcm5719-llvm-bd8f60d6d117eb782c61a559533a180d1b777e1e.zip
[analyzer] Make sure IDC works for ‘NSContainer value/key is nil’ checks.
Register the nil tracking visitors with the region and refactor trackNullOrUndefValue a bit. Also adds the cast and paren stripping before checking if the value is an OpaqueValueExpr or ExprWithCleanups. llvm-svn: 178093
Diffstat (limited to 'clang/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp')
-rw-r--r--clang/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp b/clang/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp
index fb43964a89c..533a324e750 100644
--- a/clang/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp
@@ -139,6 +139,7 @@ void NilArgChecker::WarnIfNilArg(CheckerContext &C,
BugReport *R = new BugReport(*BT, os.str(), N);
R->addRange(msg.getArgSourceRange(Arg));
+ bugreporter::trackNullOrUndefValue(N, msg.getArgExpr(Arg), *R);
C.emitReport(R);
}
}
OpenPOWER on IntegriCloud