[Analyzer][NFC] Remove prefix from WebKitNoUncountedMemberChecker name
authorJan Korous <jkorous@apple.com>
Mon, 15 Jun 2020 20:58:34 +0000 (13:58 -0700)
committerJan Korous <jkorous@apple.com>
Mon, 15 Jun 2020 21:13:56 +0000 (14:13 -0700)
clang/docs/analyzer/checkers.rst
clang/include/clang/StaticAnalyzer/Checkers/Checkers.td
clang/lib/StaticAnalyzer/Checkers/WebKit/NoUncountedMembersChecker.cpp
clang/test/Analysis/Checkers/WebKit/uncounted-members-regression-46142.cpp
clang/test/Analysis/Checkers/WebKit/uncounted-members.cpp

index 7fb5719..d14bd2d 100644 (file)
@@ -1404,9 +1404,9 @@ Ref-counted types hold their ref-countable data by a raw pointer and allow impli
 
  struct Derived : RefCntblBase { }; // warn
 
-.. _webkit-WebKitNoUncountedMemberChecker:
+.. _webkit-NoUncountedMemberChecker:
 
-webkit.WebKitNoUncountedMemberChecker
+webkit.NoUncountedMemberChecker
 """""""""""""""""""""""""""""""""""""
 Raw pointers and references to uncounted types can't be used as class members. Only ref-counted types are allowed.
 
@@ -2404,7 +2404,7 @@ Here are some examples of situations that we warn about as they *might* be poten
       consume(uncounted); // warn
     }
 
-Although we are enforcing member variables to be ref-counted by `webkit.WebKitNoUncountedMemberChecker` any method of the same class still has unrestricted access to these. Since from a caller's perspective we can't guarantee a particular member won't get modified by callee (directly or indirectly) we don't consider values obtained from members safe.
+Although we are enforcing member variables to be ref-counted by `webkit.NoUncountedMemberChecker` any method of the same class still has unrestricted access to these. Since from a caller's perspective we can't guarantee a particular member won't get modified by callee (directly or indirectly) we don't consider values obtained from members safe.
 
 Note: It's likely this heuristic could be made more precise with fewer false positives - for example calls to free functions that don't have any parameter other than the pointer should be safe as the callee won't be able to tamper with the member unless it's a global variable.
 
index 23bc0e1..9de3245 100644 (file)
@@ -1625,7 +1625,7 @@ def RefCntblBaseVirtualDtorChecker : Checker<"RefCntblBaseVirtualDtor">,
   HelpText<"Check for any ref-countable base class having virtual destructor.">,
   Documentation<HasDocumentation>;
 
-def WebKitNoUncountedMemberChecker : Checker<"WebKitNoUncountedMemberChecker">,
+def NoUncountedMemberChecker : Checker<"NoUncountedMemberChecker">,
   HelpText<"Check for no uncounted member variables.">,
   Documentation<HasDocumentation>;
 
index 2deefab..3956db9 100644 (file)
@@ -145,11 +145,11 @@ public:
 };
 } // namespace
 
-void ento::registerWebKitNoUncountedMemberChecker(CheckerManager &Mgr) {
+void ento::registerNoUncountedMemberChecker(CheckerManager &Mgr) {
   Mgr.registerChecker<NoUncountedMemberChecker>();
 }
 
-bool ento::shouldRegisterWebKitNoUncountedMemberChecker(
+bool ento::shouldRegisterNoUncountedMemberChecker(
     const CheckerManager &Mgr) {
   return true;
 }
index 20e58e7..94ddcac 100644 (file)
@@ -1,6 +1,6 @@
 // regression test for https://bugs.llvm.org/show_bug.cgi?id=46142
 
-// RUN: %clang_analyze_cc1 -analyzer-checker=webkit.WebKitNoUncountedMemberChecker -verify %s
+// RUN: %clang_analyze_cc1 -analyzer-checker=webkit.NoUncountedMemberChecker -verify %s
 // expected-no-diagnostics
 
 class ClassWithoutADefinition;
index e88c0b3..a0ea61e 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_analyze_cc1 -analyzer-checker=webkit.WebKitNoUncountedMemberChecker -verify %s
+// RUN: %clang_analyze_cc1 -analyzer-checker=webkit.NoUncountedMemberChecker -verify %s
 
 #include "mock-types.h"