diff options
author | Alexander Kornienko <alexfh@google.com> | 2016-01-13 14:16:35 +0000 |
---|---|---|
committer | Alexander Kornienko <alexfh@google.com> | 2016-01-13 14:16:35 +0000 |
commit | 98ba0813e6084e699483743f3b58ee3c54c2480c (patch) | |
tree | f86725764007d1001562c726f94fec42e5b84f75 /clang-tools-extra/docs/clang-tidy | |
parent | 73f018e381ca3848da094f6611a73ada2c68467a (diff) | |
download | bcm5719-llvm-98ba0813e6084e699483743f3b58ee3c54c2480c.tar.gz bcm5719-llvm-98ba0813e6084e699483743f3b58ee3c54c2480c.zip |
Support virtual-near-miss check.
Summary: Virtual function override near miss detection. Function complete. Test complete. Do not conduct Fix for now.
Reviewers: alexfh
Subscribers: cfe-commits
Patch by Cong Liu!
Differential Revision: http://reviews.llvm.org/D15823
llvm-svn: 257599
Diffstat (limited to 'clang-tools-extra/docs/clang-tidy')
-rw-r--r-- | clang-tools-extra/docs/clang-tidy/checks/list.rst | 1 | ||||
-rw-r--r-- | clang-tools-extra/docs/clang-tidy/checks/misc-virtual-near-miss.rst | 17 |
2 files changed, 18 insertions, 0 deletions
diff --git a/clang-tools-extra/docs/clang-tidy/checks/list.rst b/clang-tools-extra/docs/clang-tidy/checks/list.rst index bee3eef6e4a..011e58603e1 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/list.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/list.rst @@ -65,6 +65,7 @@ Clang-Tidy Checks misc-unused-alias-decls misc-unused-parameters misc-unused-raii + misc-virtual-near-miss modernize-loop-convert modernize-make-unique modernize-pass-by-value diff --git a/clang-tools-extra/docs/clang-tidy/checks/misc-virtual-near-miss.rst b/clang-tools-extra/docs/clang-tidy/checks/misc-virtual-near-miss.rst new file mode 100644 index 00000000000..dd40ce3555e --- /dev/null +++ b/clang-tools-extra/docs/clang-tidy/checks/misc-virtual-near-miss.rst @@ -0,0 +1,17 @@ +misc-virtual-near-miss +====================== + +Warn if a function is a near miss (ie. the name is very similar and the function signiture is the same) to a virtual function from a base class. + +Example: + +.. code-block:: c++ + + struct Base { + virtual void func(); + }; + + struct Derived : Base { + virtual funk(); + // warning: Do you want to override 'func'? + }; |