Skip to content

Commit a93ff18

Browse files
committed
[Analyzer][NFC] Remove prefix from WebKitNoUncountedMemberChecker name
1 parent 1d33c09 commit a93ff18

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

clang/docs/analyzer/checkers.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1404,9 +1404,9 @@ Ref-counted types hold their ref-countable data by a raw pointer and allow impli
14041404
14051405
struct Derived : RefCntblBase { }; // warn
14061406
1407-
.. _webkit-WebKitNoUncountedMemberChecker:
1407+
.. _webkit-NoUncountedMemberChecker:
14081408
1409-
webkit.WebKitNoUncountedMemberChecker
1409+
webkit.NoUncountedMemberChecker
14101410
"""""""""""""""""""""""""""""""""""""
14111411
Raw pointers and references to uncounted types can't be used as class members. Only ref-counted types are allowed.
14121412
@@ -2404,7 +2404,7 @@ Here are some examples of situations that we warn about as they *might* be poten
24042404
consume(uncounted); // warn
24052405
}
24062406
2407-
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.
2407+
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.
24082408
24092409
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.
24102410

clang/include/clang/StaticAnalyzer/Checkers/Checkers.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1625,7 +1625,7 @@ def RefCntblBaseVirtualDtorChecker : Checker<"RefCntblBaseVirtualDtor">,
16251625
HelpText<"Check for any ref-countable base class having virtual destructor.">,
16261626
Documentation<HasDocumentation>;
16271627

1628-
def WebKitNoUncountedMemberChecker : Checker<"WebKitNoUncountedMemberChecker">,
1628+
def NoUncountedMemberChecker : Checker<"NoUncountedMemberChecker">,
16291629
HelpText<"Check for no uncounted member variables.">,
16301630
Documentation<HasDocumentation>;
16311631

clang/lib/StaticAnalyzer/Checkers/WebKit/NoUncountedMembersChecker.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,11 +145,11 @@ class NoUncountedMemberChecker
145145
};
146146
} // namespace
147147

148-
void ento::registerWebKitNoUncountedMemberChecker(CheckerManager &Mgr) {
148+
void ento::registerNoUncountedMemberChecker(CheckerManager &Mgr) {
149149
Mgr.registerChecker<NoUncountedMemberChecker>();
150150
}
151151

152-
bool ento::shouldRegisterWebKitNoUncountedMemberChecker(
152+
bool ento::shouldRegisterNoUncountedMemberChecker(
153153
const CheckerManager &Mgr) {
154154
return true;
155155
}

clang/test/Analysis/Checkers/WebKit/uncounted-members-regression-46142.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// regression test for https://bugs.llvm.org/show_bug.cgi?id=46142
22

3-
// RUN: %clang_analyze_cc1 -analyzer-checker=webkit.WebKitNoUncountedMemberChecker -verify %s
3+
// RUN: %clang_analyze_cc1 -analyzer-checker=webkit.NoUncountedMemberChecker -verify %s
44
// expected-no-diagnostics
55

66
class ClassWithoutADefinition;

clang/test/Analysis/Checkers/WebKit/uncounted-members.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_analyze_cc1 -analyzer-checker=webkit.WebKitNoUncountedMemberChecker -verify %s
1+
// RUN: %clang_analyze_cc1 -analyzer-checker=webkit.NoUncountedMemberChecker -verify %s
22

33
#include "mock-types.h"
44

0 commit comments

Comments
 (0)