[PATCH] D53771: [clang-tidy] Avoid C arrays check

Roman Lebedev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 30 11:44:32 PDT 2018


lebedev.ri added inline comments.


================
Comment at: clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp:84
         "cppcoreguidelines-c-copy-assignment-signature");
+    CheckFactories.registerCheck<modernize::AvoidCArraysCheck>(
+        "cppcoreguidelines-avoid-c-arrays");
----------------
JonasToth wrote:
> please conserve the alphabetical order here
Sorted all the `CheckFactories.registerCheck<>();` lines.


================
Comment at: clang-tidy/modernize/AvoidCArraysCheck.cpp:44
+              unless(anyOf(hasParent(varDecl(isExternC())),
+                           hasAncestor(functionDecl(isExternC())))))
+          .bind("typeloc"),
----------------
JonasToth wrote:
> What about struct-decls that are externC?
Hm, what is a `struct-decl`?


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D53771





More information about the cfe-commits mailing list