aboutsummaryrefslogtreecommitdiff
path: root/clang-tools-extra/clang-tidy/fuchsia/FuchsiaTidyModule.cpp
diff options
context:
space:
mode:
authorJulie Hockett <juliehockett@google.com>2017-12-22 16:52:25 +0000
committerJulie Hockett <juliehockett@google.com>2017-12-22 16:52:25 +0000
commita966f45b7ee6a9c77a7040b51a18c01caac90918 (patch)
tree280861773da8ff8eea0be9932721fa8a663a0a8f /clang-tools-extra/clang-tidy/fuchsia/FuchsiaTidyModule.cpp
parent9c9b61df7e37bc1832b225c0c26123031727c8ef (diff)
downloadllvm-a966f45b7ee6a9c77a7040b51a18c01caac90918.zip
llvm-a966f45b7ee6a9c77a7040b51a18c01caac90918.tar.gz
llvm-a966f45b7ee6a9c77a7040b51a18c01caac90918.tar.bz2
[clang-tidy] Adding Fuchsia checker for overloaded operators
Adds a check to the Fuchsia module to warn if an operator is overloaded, except move and copy operators. See https://fuchsia.googlesource.com/zircon/+/master/docs/cxx.md for reference. Differential Revision: https://reviews.llvm.org/D41363 llvm-svn: 321363
Diffstat (limited to 'clang-tools-extra/clang-tidy/fuchsia/FuchsiaTidyModule.cpp')
-rw-r--r--clang-tools-extra/clang-tidy/fuchsia/FuchsiaTidyModule.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang-tools-extra/clang-tidy/fuchsia/FuchsiaTidyModule.cpp b/clang-tools-extra/clang-tidy/fuchsia/FuchsiaTidyModule.cpp
index 5ed834d..1860115 100644
--- a/clang-tools-extra/clang-tidy/fuchsia/FuchsiaTidyModule.cpp
+++ b/clang-tools-extra/clang-tidy/fuchsia/FuchsiaTidyModule.cpp
@@ -11,6 +11,7 @@
#include "../ClangTidyModule.h"
#include "../ClangTidyModuleRegistry.h"
#include "DefaultArgumentsCheck.h"
+#include "OverloadedOperatorCheck.h"
#include "VirtualInheritanceCheck.h"
using namespace clang::ast_matchers;
@@ -25,6 +26,8 @@ public:
void addCheckFactories(ClangTidyCheckFactories &CheckFactories) override {
CheckFactories.registerCheck<DefaultArgumentsCheck>(
"fuchsia-default-arguments");
+ CheckFactories.registerCheck<OverloadedOperatorCheck>(
+ "fuchsia-overloaded-operator");
CheckFactories.registerCheck<VirtualInheritanceCheck>(
"fuchsia-virtual-inheritance");
}