<p dir="ltr"><br>
On Mar 3, 2015 7:20 AM, "Alexander Kornienko" <<a href="mailto:alexfh@google.com">alexfh@google.com</a>> wrote:<br>
><br>
> ================<br>
> Comment at: clang-tidy/readability/RedundantVoidArg.cpp:41<br>
> @@ +40,3 @@<br>
> +bool protoTypeHasNoParms(QualType QT) {<br>
> +  if (const auto PT = QT->getAs<PointerType>()) {<br>
> +    QT = PT->getPointeeType();<br>
> ----------------<br>
> Please use either "auto" or "const auto *" consistently. This function has usages of both.</p>
<p dir="ltr">Generally, if your type is a pointer, please put the * on it explicitly (same for const) - if the llvm style guide doesn't already recommend this, it should. </p>
<p dir="ltr">><br>
> ================<br>
> Comment at: clang-tidy/readability/RemoveVoidArg.h:38<br>
> @@ +37,3 @@<br>
> +private:<br>
> +  bool CPlusPlusFile_;<br>
> +<br>
> ----------------<br>
> LegalizeAdulthood wrote:<br>
> > alexfh wrote:<br>
> > > 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`.<br>
> > > 2. This name violates LLVM Naming conventions: <a href="http://llvm.org/docs/CodingStandards.html#name-types-functions-variables-and-enumerators-properly">http://llvm.org/docs/CodingStandards.html#name-types-functions-variables-and-enumerators-properly</a><br>
> > 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`?<br>
> Language options only become available when a compiler instance is being initialized. The matchers are registered way before that and then multiple different compilations may be run potentially with different options (if multiple translation units have been passed to clang-tidy).<br>
><br>
> So there's no way to learn what language will be analyzed when we register matchers.<br>
><br>
> <a href="http://reviews.llvm.org/D7639">http://reviews.llvm.org/D7639</a><br>
><br>
> EMAIL PREFERENCES<br>
>   <a href="http://reviews.llvm.org/settings/panel/emailpreferences/">http://reviews.llvm.org/settings/panel/emailpreferences/</a><br>
><br>
><br>
><br>
> _______________________________________________<br>
> cfe-commits mailing list<br>
> <a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
</p>