summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Checkers
diff options
context:
space:
mode:
authorGeorge Karpenkov <ekarpenkov@apple.com>2018-11-30 02:18:50 +0000
committerGeorge Karpenkov <ekarpenkov@apple.com>2018-11-30 02:18:50 +0000
commitb43772d85cffeb786a87ff1718dcd379d8cf02dc (patch)
tree6d2161de17fac9202956eff85f5e5e38774359ab /clang/lib/StaticAnalyzer/Checkers
parent1657f36c7f48a008ef435949b6457034894745e0 (diff)
downloadbcm5719-llvm-b43772d85cffeb786a87ff1718dcd379d8cf02dc.tar.gz
bcm5719-llvm-b43772d85cffeb786a87ff1718dcd379d8cf02dc.zip
[analyzer] Switch retain count checker for OSObject to use OS_* attributes
Instead of generalized reference counting annotations. Differential Revision: https://reviews.llvm.org/D55041 llvm-svn: 347948
Diffstat (limited to 'clang/lib/StaticAnalyzer/Checkers')
-rw-r--r--clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp b/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp
index 97ee9580c2b..da47513e303 100644
--- a/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp
@@ -526,7 +526,8 @@ CFRefLeakReportVisitor::getEndPath(BugReporterContext &BRC,
os << "that is annotated as CF_RETURNS_NOT_RETAINED";
} else if (D->hasAttr<NSReturnsNotRetainedAttr>()) {
os << "that is annotated as NS_RETURNS_NOT_RETAINED";
- // TODO: once the patch is ready, insert a case for OS_RETURNS_NOT_RETAINED
+ } else if (D->hasAttr<OSReturnsNotRetainedAttr>()) {
+ os << "that is annotated as OS_RETURNS_NOT_RETAINED";
} else {
if (const ObjCMethodDecl *MD = dyn_cast<ObjCMethodDecl>(D)) {
if (BRC.getASTContext().getLangOpts().ObjCAutoRefCount) {
OpenPOWER on IntegriCloud