Skip to content

Commit 1108f5c

Browse files
committed
Revert "[Analyzer][WebKit] RefCntblBaseVirtualDtorChecker"
This reverts commit f7c7e8a. Breaks build everywhere.
1 parent f8b4412 commit 1108f5c

File tree

11 files changed

+0
-669
lines changed

11 files changed

+0
-669
lines changed

clang/docs/analyzer/checkers.rst

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1374,33 +1374,6 @@ double freed, or use after freed. This check attempts to find such problems.
13741374
zx_handle_close(sb);
13751375
}
13761376
1377-
WebKit
1378-
^^^^^^
1379-
1380-
WebKit is an open-source web browser engine available for macOS, iOS and Linux.
1381-
This section describes checkers that can find issues in WebKit codebase.
1382-
1383-
Most of the checkers focus on memory management for which WebKit uses custom implementation of reference counted smartpointers.
1384-
Checker are formulated in terms related to ref-counting:
1385-
* *Ref-counted type* is either ``Ref<T>`` or ``RefPtr<T>``.
1386-
* *Ref-countable type* is any type that implements ``ref()`` and ``deref()`` methods as ``RefPtr<>`` is a template (i. e. relies on duck typing).
1387-
* *Uncounted type* is ref-countable but not ref-counted type.
1388-
1389-
.. _webkit-WebKitRefCntblBaseVirtualDtor:
1390-
1391-
webkit.WebKitRefCntblBaseVirtualDtor
1392-
""""""""""""""""""""""""""""""""""""
1393-
All uncounted types used as base classes must have a virtual destructor.
1394-
1395-
Ref-counted types hold their ref-countable data by a raw pointer and allow implicit upcasting from ref-counted pointer to derived type to ref-counted pointer to base type. This might lead to an object of (dynamic) derived type being deleted via pointer to the base class type which C++ standard defines as UB in case the base class doesn't have virtual destructor ``[expr.delete]``.
1396-
1397-
.. code-block:: cpp
1398-
struct RefCntblBase {
1399-
void ref() {}
1400-
void deref() {}
1401-
};
1402-
1403-
struct Derived : RefCntblBase { }; // warn
14041377
14051378
.. _alpha-checkers:
14061379

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

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,6 @@ def NonDeterminismAlpha : Package<"nondeterminism">, ParentPackage<Alpha>;
116116
def Fuchsia : Package<"fuchsia">;
117117
def FuchsiaAlpha : Package<"fuchsia">, ParentPackage<Alpha>;
118118

119-
def WebKit : Package<"webkit">;
120-
def WebKitAlpha : Package<"webkit">, ParentPackage<Alpha>;
121-
122119
//===----------------------------------------------------------------------===//
123120
// Core Checkers.
124121
//===----------------------------------------------------------------------===//
@@ -1623,13 +1620,3 @@ def FuchsiaLockChecker : Checker<"Lock">,
16231620

16241621
} // end fuchsia
16251622

1626-
//===----------------------------------------------------------------------===//
1627-
// WebKit checkers.
1628-
//===----------------------------------------------------------------------===//
1629-
1630-
let ParentPackage = WebKit in {
1631-
1632-
def WebKitRefCntblBaseVirtualDtorChecker : Checker<"WebKitRefCntblBaseVirtualDtor">,
1633-
HelpText<"Check for any ref-countable base class having virtual destructor.">,
1634-
Documentation<HasDocumentation>;
1635-
} // end webkit

clang/lib/StaticAnalyzer/Checkers/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,6 @@ add_clang_library(clangStaticAnalyzerCheckers
121121
VLASizeChecker.cpp
122122
ValistChecker.cpp
123123
VirtualCallChecker.cpp
124-
WebKit/PtrTypesSemantics.cpp
125-
WebKit/RefCntblBaseVirtualDtorChecker.cpp
126124

127125
LINK_LIBS
128126
clangAST

clang/lib/StaticAnalyzer/Checkers/WebKit/ASTUtils.h

Lines changed: 0 additions & 70 deletions
This file was deleted.

clang/lib/StaticAnalyzer/Checkers/WebKit/DiagOutputUtils.h

Lines changed: 0 additions & 28 deletions
This file was deleted.

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

Lines changed: 0 additions & 172 deletions
This file was deleted.

clang/lib/StaticAnalyzer/Checkers/WebKit/PtrTypesSemantics.h

Lines changed: 0 additions & 59 deletions
This file was deleted.

0 commit comments

Comments
 (0)