diff options
author | Ted Kremenek <kremenek@apple.com> | 2011-03-17 04:10:25 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2011-03-17 04:10:25 +0000 |
commit | f3f929386254a53c398fa884848738113a73ca23 (patch) | |
tree | 829b18c0269957c0ea35513f42af844701dfddcb /lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp | |
parent | 928c415d5dde89b7c01e41f0dfa8a782cbfa8e7d (diff) |
Teach VariadicMethodTypeChecker about pointers attributed as 'NSObject'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127798 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp')
-rw-r--r-- | lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp b/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp index 51847094da..60c437c1e6 100644 --- a/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp +++ b/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp @@ -596,6 +596,10 @@ void VariadicMethodTypeChecker::checkPreObjCMessage(ObjCMessage msg, if (isa<loc::ConcreteInt>(msg.getArgSVal(I, state))) continue; + // Ignore pointer types annotated with 'NSObject' attribute. + if (C.getASTContext().isObjCNSObjectType(ArgTy)) + continue; + // Ignore CF references, which can be toll-free bridged. if (cocoa::isCFObjectRef(ArgTy)) continue; |