summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorJulie Hockett <juliehockett@google.com>2017-12-15 18:54:28 +0000
committerJulie Hockett <juliehockett@google.com>2017-12-15 18:54:28 +0000
commit43d6a1c27721aaabf38e7f78fa368aec001430bf (patch)
tree1ba8aaa5e589483283dfdb00f5f5004ec11a4638 /docs
parent17c91c072e2772b6b728f4a6906dd0f4201395c5 (diff)
[clang-tidy] Adding Fuchsia checker for virtual inheritance
Adds a check to the Fuchsia module to warn if classes are defined with virtual inheritance. See https://fuchsia.googlesource.com/zircon/+/master/docs/cxx.md for reference. Differential Revision: https://reviews.llvm.org/D40813 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@320841 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs')
-rw-r--r--docs/ReleaseNotes.rst5
-rw-r--r--docs/clang-tidy/checks/fuchsia-virtual-inheritance.rst14
-rw-r--r--docs/clang-tidy/checks/list.rst1
3 files changed, 20 insertions, 0 deletions
diff --git a/docs/ReleaseNotes.rst b/docs/ReleaseNotes.rst
index ea312d93..b8901785 100644
--- a/docs/ReleaseNotes.rst
+++ b/docs/ReleaseNotes.rst
@@ -134,7 +134,12 @@ Improvements to clang-tidy
<http://clang.llvm.org/extra/clang-tidy/checks/fuchsia-default-arguments.html>`_ check
Warns if a function or method is declared or called with default arguments.
+
+- New `fuchsia-virtual-inheritance
+ <http://clang.llvm.org/extra/clang-tidy/checks/fuchsia-virtual-inheritance.html>`_ check
+ Warns if classes are defined with virtual inheritance.
+
- New `google-objc-avoid-throwing-exception
<http://clang.llvm.org/extra/clang-tidy/checks/google-objc-avoid-throwing-exception.html>`_ check
diff --git a/docs/clang-tidy/checks/fuchsia-virtual-inheritance.rst b/docs/clang-tidy/checks/fuchsia-virtual-inheritance.rst
new file mode 100644
index 00000000..f73a49b2
--- /dev/null
+++ b/docs/clang-tidy/checks/fuchsia-virtual-inheritance.rst
@@ -0,0 +1,14 @@
+.. title:: clang-tidy - fuchsia-virtual-inheritance
+
+fuchsia-virtual-inheritance
+===========================
+
+Warns if classes are defined with virtual inheritance.
+
+For example, classes should not be defined with virtual inheritance:
+
+.. code-block:: c++
+
+ class B : public virtual A {}; // warning
+
+See the features disallowed in Fuchsia at https://fuchsia.googlesource.com/zircon/+/master/docs/cxx.md
diff --git a/docs/clang-tidy/checks/list.rst b/docs/clang-tidy/checks/list.rst
index 4feaa490..e3b0c36c 100644
--- a/docs/clang-tidy/checks/list.rst
+++ b/docs/clang-tidy/checks/list.rst
@@ -69,6 +69,7 @@ Clang-Tidy Checks
cppcoreguidelines-slicing
cppcoreguidelines-special-member-functions
fuchsia-default-arguments
+ fuchsia-virtual-inheritance
google-build-explicit-make-pair
google-build-namespaces
google-build-using-namespace