[PATCH] Add readability-remove-void-arg check to clang-tidy

Richard legalize at xmission.com
Mon Mar 2 10:50:54 PST 2015


================
Comment at: clang-tidy/readability/RemoveVoidArg.h:38
@@ +37,3 @@
+private:
+  bool CPlusPlusFile_;
+
----------------
alexfh wrote:
> 1. You don't need to store this flag as it's easy and cheap to check it on each call to `check()`: it's available as `Result.Context->getLangOpts().CPlusPlus`.
> 2. This name violates LLVM Naming conventions: http://llvm.org/docs/CodingStandards.html#name-types-functions-variables-and-enumerators-properly
Thanks for showing me where I could get that option.  I drilled around in the code for a while and couldn't find it except hanging off the Compiler.  What would be really nice is if I could get ahold of that flag when I'm asked to add matchers as I could simply not add any matchers in that case, but `registerPPCallbacks` is called after `registerMatchers`.  Can I navigate to it from `ClangTidyContext`?

http://reviews.llvm.org/D7639

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






More information about the cfe-commits mailing list