diff options
author | Anna Zaks <ganna@apple.com> | 2013-03-26 23:58:49 +0000 |
---|---|---|
committer | Anna Zaks <ganna@apple.com> | 2013-03-26 23:58:49 +0000 |
commit | 1533833e21ae5b3f5f39b168b3fbac109ee77008 (patch) | |
tree | 3d856870ee5a9bd1c228670ede34c98ff71142b1 /lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp | |
parent | 2fcadbeecbbc0b48dc92b9ce778e5c7a53292505 (diff) |
[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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178093 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp')
-rw-r--r-- | lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp b/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp index fb43964a89..533a324e75 100644 --- a/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp +++ b/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); } } |