Eugene.Zelenko added inline comments.

================
Comment at: clang-tools-extra/clang-tidy/modernize/AvoidCArraysCheck.cpp:94
+
+  auto StartOfFile = SM.getLocForStartOfFile(SM.getFileID(Location));
+  while (Location != StartOfFile) {
----------------
Please do not use `auto` unless type is explicitly stated in same statement or 
iterator.


================
Comment at: clang-tools-extra/clang-tidy/modernize/AvoidCArraysCheck.cpp:498
+                return false;
+              const CXXConstructExpr *ConstructExpr =
+                  dyn_cast<CXXConstructExpr>(SpelledExpr);
----------------
`auto` could be used here.


================
Comment at: clang-tools-extra/clang-tidy/modernize/AvoidCArraysCheck.cpp:588
+    : ClangTidyCheck(Name, Context),
+      IncludeInserter(Options.getLocalOrGlobal("IncludeStyle",
+                                               utils::IncludeSorter::IS_LLVM),
----------------
Should be global option, because it's used in other checks.


================
Comment at: 
clang-tools-extra/docs/clang-tidy/checks/modernize/avoid-c-arrays.rst:71
 can be either ``char* argv[]`` or ``char** argv``, but cannot be
 ``std::array<>``.
----------------
Missing documentation for `IncludeStyle` option if it'll remain local.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D145138

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to