Teach VariadicMethodTypeChecker about pointers attributed as 'NSObject'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127798 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp b/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp
index 5184709..60c437c 100644
--- a/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp
+++ b/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp
@@ -596,6 +596,10 @@
     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;