summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp
diff options
context:
space:
mode:
authorAlexander Kornienko <alexfh@google.com>2014-03-05 13:14:32 +0000
committerAlexander Kornienko <alexfh@google.com>2014-03-05 13:14:32 +0000
commit16ac6cebcfb58ef80cb708cca2ce5994cf64abdb (patch)
treec34ee03b5f2119c45514415b4c9d272dbe0bfcfa /clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp
parent21f3b77707c5b4a273746095e078671ec08d2ab6 (diff)
downloadbcm5719-llvm-16ac6cebcfb58ef80cb708cca2ce5994cf64abdb.tar.gz
bcm5719-llvm-16ac6cebcfb58ef80cb708cca2ce5994cf64abdb.zip
Added a module for checks not related to LLVM or Google coding style.
llvm-svn: 202970
Diffstat (limited to 'clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp')
-rw-r--r--clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp b/clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp
new file mode 100644
index 00000000000..e262dc356d0
--- /dev/null
+++ b/clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp
@@ -0,0 +1,32 @@
+//===--- MiscTidyModule.cpp - clang-tidy ----------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "../ClangTidy.h"
+#include "../ClangTidyModule.h"
+#include "../ClangTidyModuleRegistry.h"
+
+namespace clang {
+namespace tidy {
+
+class MiscModule : public ClangTidyModule {
+public:
+ void addCheckFactories(ClangTidyCheckFactories &CheckFactories) override {
+ }
+};
+
+// Register the MiscTidyModule using this statically initialized variable.
+static ClangTidyModuleRegistry::Add<MiscModule>
+X("misc-module", "Adds miscellaneous lint checks.");
+
+// This anchor is used to force the linker to link in the generated object file
+// and thus register the MiscModule.
+volatile int MiscModuleAnchorSource = 0;
+
+} // namespace tidy
+} // namespace clang
OpenPOWER on IntegriCloud