[PATCH] clang-tidy checker that enforce proper parentheses in macros

Alexander Kornienko alexfh at google.com
Fri May 8 07:25:31 PDT 2015


Sorry for the delay. I was on vacation and currently digging out stuff out of my inbox. I'll try to review this thoroughly early next week. A couple of comments for now.


================
Comment at: clang-tidy/misc/MacroParenthesesCheck.cpp:32
@@ +31,3 @@
+private:
+  /** replacement list with calculations should be enclosed in parentheses */
+  void replacementList(const Token &MacroNameTok, const MacroDirective *MD);
----------------
Here and below. Please use C++ style comments (`//` or `///` for Doxygen comments). The comments should be English prose with proper capitalization and punctuation.

================
Comment at: clang-tidy/misc/MacroParenthesesCheck.h:18
@@ +17,3 @@
+
+class MacroParenthesesCheck : public ClangTidyCheck {
+public:
----------------
Please add a class comment describing the purpose of this check, motivation for it and what specific code patterns it triggers on.

http://reviews.llvm.org/D9528

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the cfe-commits mailing list