From 88530f880e7f3b1874f6bb98d7cfe84348ed0227 Mon Sep 17 00:00:00 2001 From: Anna Zaks Date: Wed, 3 Apr 2013 19:28:22 +0000 Subject: [PATCH] =?utf8?q?[analyzer]=20Rename=20=E2=80=9CMac=20OS=20X=20AP?= =?utf8?q?I=E2=80=9D,=20=E2=80=9CMac=20OS=20API=E2=80=9D=20->=20=E2=80=9CA?= =?utf8?q?PI=20Misuse=20(Apple)=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit As they are relevant on both Mac and iOS. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178687 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/StaticAnalyzer/Checkers/Checkers.td | 2 +- lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp | 3 ++- lib/StaticAnalyzer/Checkers/MacOSXAPIChecker.cpp | 4 ++-- test/Analysis/unix-fns.c | 4 ++-- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/StaticAnalyzer/Checkers/Checkers.td b/lib/StaticAnalyzer/Checkers/Checkers.td index f7fe0fc8e8..3db3fb9962 100644 --- a/lib/StaticAnalyzer/Checkers/Checkers.td +++ b/lib/StaticAnalyzer/Checkers/Checkers.td @@ -354,7 +354,7 @@ let ParentPackage = OSX in { def MacOSXAPIChecker : Checker<"API">, InPackage, - HelpText<"Check for proper uses of various Mac OS X APIs">, + HelpText<"Check for proper uses of various Apple APIs">, DescFile<"MacOSXAPIChecker.cpp">; def MacOSKeychainAPIChecker : Checker<"SecKeychainAPI">, diff --git a/lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp b/lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp index 2cd4afe718..f1f06c798c 100644 --- a/lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp @@ -91,7 +91,8 @@ private: inline void initBugType() const { if (!BT) - BT.reset(new BugType("Improper use of SecKeychain API", "Mac OS API")); + BT.reset(new BugType("Improper use of SecKeychain API", + "API Misuse (Apple)")); } void generateDeallocatorMismatchReport(const AllocationPair &AP, diff --git a/lib/StaticAnalyzer/Checkers/MacOSXAPIChecker.cpp b/lib/StaticAnalyzer/Checkers/MacOSXAPIChecker.cpp index a76b3d7a7e..32ebb51226 100644 --- a/lib/StaticAnalyzer/Checkers/MacOSXAPIChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/MacOSXAPIChecker.cpp @@ -8,7 +8,7 @@ //===----------------------------------------------------------------------===// // // This defines MacOSXAPIChecker, which is an assortment of checks on calls -// to various, widely used Mac OS X functions. +// to various, widely used Apple APIs. // // FIXME: What's currently in BasicObjCFoundationChecks.cpp should be migrated // to here, using the new Checker interface. @@ -68,7 +68,7 @@ void MacOSXAPIChecker::CheckDispatchOnce(CheckerContext &C, const CallExpr *CE, if (!BT_dispatchOnce) BT_dispatchOnce.reset(new BugType("Improper use of 'dispatch_once'", - "Mac OS X API")); + "API Misuse (Apple)")); // Handle _dispatch_once. In some versions of the OS X SDK we have the case // that dispatch_once is a macro that wraps a call to _dispatch_once. diff --git a/test/Analysis/unix-fns.c b/test/Analysis/unix-fns.c index cfd5d14e8a..8daac1c81c 100644 --- a/test/Analysis/unix-fns.c +++ b/test/Analysis/unix-fns.c @@ -552,7 +552,7 @@ void test_inline_dispatch_once() { // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: descriptionCall to 'dispatch_once' uses the local variable 'pred' for the predicate value. Using such transient memory for the predicate is potentially dangerous. Perhaps you intended to declare the variable as 'static'? -// CHECK-NEXT: categoryMac OS X API +// CHECK-NEXT: categoryAPI Misuse (Apple) // CHECK-NEXT: typeImproper use of 'dispatch_once' // CHECK-NEXT: issue_context_kindfunction // CHECK-NEXT: issue_contexttest_dispatch_once @@ -1352,7 +1352,7 @@ void test_inline_dispatch_once() { // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: descriptionCall to 'dispatch_once' uses the local variable 'pred' for the predicate value. Using such transient memory for the predicate is potentially dangerous. Perhaps you intended to declare the variable as 'static'? -// CHECK-NEXT: categoryMac OS X API +// CHECK-NEXT: categoryAPI Misuse (Apple) // CHECK-NEXT: typeImproper use of 'dispatch_once' // CHECK-NEXT: issue_context_kindfunction // CHECK-NEXT: issue_contexttest_dispatch_once_in_macro -- 2.40.0