aboutsummaryrefslogtreecommitdiff
path: root/clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp
diff options
context:
space:
mode:
authorSamuel Benzaquen <sbenza@google.com>2016-04-14 21:15:57 +0000
committerSamuel Benzaquen <sbenza@google.com>2016-04-14 21:15:57 +0000
commit4fa2d57c6db8c7c5e017761643606697c050787c (patch)
treeb5d64e06f0870cbd790306e8334bec61808321c8 /clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp
parent1ca263c8903b765349d48490de1bfa7def0dc48d (diff)
downloadllvm-4fa2d57c6db8c7c5e017761643606697c050787c.zip
llvm-4fa2d57c6db8c7c5e017761643606697c050787c.tar.gz
llvm-4fa2d57c6db8c7c5e017761643606697c050787c.tar.bz2
[clang-tidy] Add check misc-multiple-statement-macro
Summary: The check detects multi-statement macros that are used in unbraced conditionals. Only the first statement will be part of the conditionals and the rest will fall outside of it and executed unconditionally. Reviewers: alexfh Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D18766 llvm-svn: 266369
Diffstat (limited to 'clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp')
-rw-r--r--clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp b/clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp
index efbcde7..df335fa 100644
--- a/clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp
+++ b/clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp
@@ -25,6 +25,7 @@
#include "MisplacedWideningCastCheck.h"
#include "MoveConstantArgumentCheck.h"
#include "MoveConstructorInitCheck.h"
+#include "MultipleStatementMacroCheck.h"
#include "NewDeleteOverloadsCheck.h"
#include "NoexceptMoveConstructorCheck.h"
#include "NonCopyableObjects.h"
@@ -79,6 +80,8 @@ public:
"misc-move-const-arg");
CheckFactories.registerCheck<MoveConstructorInitCheck>(
"misc-move-constructor-init");
+ CheckFactories.registerCheck<MultipleStatementMacroCheck>(
+ "misc-multiple-statement-macro");
CheckFactories.registerCheck<NewDeleteOverloadsCheck>(
"misc-new-delete-overloads");
CheckFactories.registerCheck<NoexceptMoveConstructorCheck>(