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 | 990464cb306e6a520e0af0abfb11a008bd730ef3 (patch) | |
| tree | d63d9a9f5b818cea8b7e093185e7fb0ce2cdf0c6 /clang/lib | |
| parent | e8300e5eba0636b5ef587ec01a2f710ea2c85833 (diff) | |
| download | bcm5719-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.cpp | 4 |
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(); } |

