[PATCH] D144217: [clang-tidy] Fix false-positive in readability-container-size-empty

Piotr Zegar via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 22 00:59:14 PST 2023


PiotrZSL added inline comments.


================
Comment at: clang-tools-extra/clang-tidy/readability/ContainerSizeEmptyCheck.cpp:101
+      IgnoreComparisonForTypesRegexp(
+          Options.get("IgnoreComparisonForTypesRegexp", "^::std::array")) {}
+
----------------
carlosgalvezp wrote:
> I also realize that in other checks, this is typically implemented as a list (comma or semicolon-separated) instead of a regex. Would it make sense to do that here as well, for consistency? As a user I would also find it easier and more intuitive to type a list than to have to google how to create a list using regex :) 
I usually prefer regexp, as it allow more flexibility (like matching templates), but I can change this to use semicolon separated list, in this case it would also do a job.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D144217



More information about the cfe-commits mailing list