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

Roman Lebedev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Nov 10 07:14:39 PST 2018


lebedev.ri added inline comments.


================
Comment at: clang-tidy/modernize/AvoidCArraysCheck.cpp:64
+  diag(ArrayType->getBeginLoc(),
+       isa<VariableArrayType>(ArrayType->getTypePtr()) ? UseVector : UseArray);
+}
----------------
JonasToth wrote:
> Why `isa<>` and not `isVariableArrayType()` (does it exist?)
> `isa<>` would not resolve typedefs, but I think they should be considered.
Hmm, interesting point.
I'm not sure ATM how to expose it in tests, but it counts as a cleanup anyway.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D53771





More information about the cfe-commits mailing list