================
@@ -168,6 +172,15 @@ void ContainerSizeEmptyCheck::registerMatchers(MatchFinder 
*Finder) {
   const auto ValidContainer = qualType(
       anyOf(ValidContainerNonTemplateType, ValidContainerTemplateType));
 
+  const auto ExcludedLengthTypesMatcher = qualType(
+      anyOf(hasDeclaration(cxxRecordDecl(
+                matchers::matchesAnyListedRegexName(ExcludedLengthTypes))),
+            hasCanonicalType(hasDeclaration(cxxRecordDecl(
+                matchers::matchesAnyListedRegexName(ExcludedLengthTypes))))));
+  const auto ExcludedLengthExprType = qualType(
+      anyOf(ExcludedLengthTypesMatcher, pointsTo(ExcludedLengthTypesMatcher),
+            references(ExcludedLengthTypesMatcher)));
----------------
MitraGulla wrote:

I added tests for both pointer and reference types of `std::match_results` 
covering `length()` and `size()`. Like i added several test cases for now. If 
you feel some are unnecessary, I will remove them and keep only the important 
ones.

https://github.com/llvm/llvm-project/pull/234905
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to