[PATCH] D69560: [clang-tidy] Add 'cppcoreguidelines-avoid-adjacent-arguments-of-same-type' check

Whisperity via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 31 03:08:01 PDT 2019


whisperity marked 11 inline comments as done.
whisperity added inline comments.


================
Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/AdjacentArgumentsOfSameTypeCheck.cpp:488
+void AdjacentArgumentsOfSameTypeCheck::registerMatchers(MatchFinder *Finder) {
+  if (!getLangOpts().CPlusPlus)
+    return;
----------------
whisperity wrote:
> Eugene.Zelenko wrote:
> > Check seems to be useful for C and probably for Objective-C.
> I'm not knowledgeable about Objective-C at all to make a decision on how the "adjacent argument ranges" could be calculated and what mixups are possible. As for C, should a `cppcoreguidelines-` check be enabled for C? Or you mean we should allow it to work, and the user will toggle how they see fit.
I've added a  `FIXME` for ObjC as I'm really not qualified in that language. C support has been added.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D69560/new/

https://reviews.llvm.org/D69560





More information about the cfe-commits mailing list