summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2012-01-04 00:35:48 +0000
committerTed Kremenek <kremenek@apple.com>2012-01-04 00:35:48 +0000
commit990464cb306e6a520e0af0abfb11a008bd730ef3 (patch)
treed63d9a9f5b818cea8b7e093185e7fb0ce2cdf0c6 /clang/lib
parente8300e5eba0636b5ef587ec01a2f710ea2c85833 (diff)
downloadbcm5719-llvm-990464cb306e6a520e0af0abfb11a008bd730ef3.tar.gz
bcm5719-llvm-990464cb306e6a520e0af0abfb11a008bd730ef3.zip
Teach the static analyzer to not treat XPC types as CF types.
llvm-svn: 147506
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Analysis/CocoaConventions.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Analysis/CocoaConventions.cpp b/clang/lib/Analysis/CocoaConventions.cpp
index 9dc5ef4906b..0c1531da148 100644
--- a/clang/lib/Analysis/CocoaConventions.cpp
+++ b/clang/lib/Analysis/CocoaConventions.cpp
@@ -68,7 +68,9 @@ bool cocoa::isRefType(QualType RetTy, StringRef Prefix,
StringRef TDName = TD->getDecl()->getIdentifier()->getName();
if (TDName.startswith(Prefix) && TDName.endswith("Ref"))
return true;
-
+ // XPC unfortunately uses CF-style function names, but aren't CF types.
+ if (TDName.startswith("xpc_"))
+ return false;
RetTy = TD->getDecl()->getUnderlyingType();
}
OpenPOWER on IntegriCloud