summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp
diff options
context:
space:
mode:
authorDaniel Marjamaki <daniel.marjamaki@evidente.se>2015-06-16 14:27:31 +0000
committerDaniel Marjamaki <daniel.marjamaki@evidente.se>2015-06-16 14:27:31 +0000
commit302275a938141ab1af7b7d73007ae2ad3bc802bc (patch)
tree80678fb2205d26eb23593a469bec0af64888243d /clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp
parent3f9a1dca924ccb4472dcab37ea3ab521a894cfed (diff)
downloadbcm5719-llvm-302275a938141ab1af7b7d73007ae2ad3bc802bc.tar.gz
bcm5719-llvm-302275a938141ab1af7b7d73007ae2ad3bc802bc.zip
clang-tidy: Add checker that warns about missing parentheses in macros
* calculations in the replacement list should be inside parentheses * macro arguments should be inside parentheses llvm-svn: 239820
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 21248d5ab09..91f59f7588a 100644
--- a/clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp
+++ b/clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp
@@ -16,6 +16,7 @@
#include "BoolPointerImplicitConversionCheck.h"
#include "InaccurateEraseCheck.h"
#include "InefficientAlgorithmCheck.h"
+#include "MacroParenthesesCheck.h"
#include "NoexceptMoveConstructorCheck.h"
#include "StaticAssertCheck.h"
#include "SwappedArgumentsCheck.h"
@@ -42,6 +43,8 @@ public:
"misc-inaccurate-erase");
CheckFactories.registerCheck<InefficientAlgorithmCheck>(
"misc-inefficient-algorithm");
+ CheckFactories.registerCheck<MacroParenthesesCheck>(
+ "misc-macro-parentheses");
CheckFactories.registerCheck<NoexceptMoveConstructorCheck>(
"misc-noexcept-move-constructor");
CheckFactories.registerCheck<StaticAssertCheck>(
OpenPOWER on IntegriCloud