diff options
author | Ted Kremenek <kremenek@apple.com> | 2012-01-04 00:35:48 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2012-01-04 00:35:48 +0000 |
commit | 1c87980ef18dbf4669c7194d60138ff9747d7ab7 (patch) | |
tree | 88b0649fe04aef7c7b9208cee71d40ed405be9f7 /lib/Analysis/CocoaConventions.cpp | |
parent | 0507f7ee76ed838ce3012ca9e10ff7811723acf2 (diff) |
Teach the static analyzer to not treat XPC types as CF types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147506 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/CocoaConventions.cpp')
-rw-r--r-- | lib/Analysis/CocoaConventions.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Analysis/CocoaConventions.cpp b/lib/Analysis/CocoaConventions.cpp index 9dc5ef4906..0c1531da14 100644 --- a/lib/Analysis/CocoaConventions.cpp +++ b/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(); } |