summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2011-03-17 04:10:25 +0000
committerTed Kremenek <kremenek@apple.com>2011-03-17 04:10:25 +0000
commit70727343cfc77bbb65c7b7554d0f700cf656cbfa (patch)
tree7139fd9ad4f8aa3106d6e7d2465c8b5ad469d481 /clang/lib
parent6fa1daede52acb83bdfe66f2c1cbab2562e13763 (diff)
downloadbcm5719-llvm-70727343cfc77bbb65c7b7554d0f700cf656cbfa.tar.gz
bcm5719-llvm-70727343cfc77bbb65c7b7554d0f700cf656cbfa.zip
Teach VariadicMethodTypeChecker about pointers attributed as 'NSObject'.
llvm-svn: 127798
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp b/clang/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp
index 51847094dad..60c437c1e6f 100644
--- a/clang/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp
+++ b/clang/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;
OpenPOWER on IntegriCloud