================
@@ -81,7 +81,10 @@ void StringConstructorCheck::registerMatchers(MatchFinder
*Finder) {
Finder->addMatcher(
cxxConstructExpr(
hasDeclaration(cxxMethodDecl(hasName("basic_string"))),
- argumentCountIs(2), hasArgument(0, hasType(qualType(isInteger()))),
+ anyOf(argumentCountIs(2),
+ allOf(argumentCountIs(3),
+ hasArgument(2, unless(hasType(qualType(isInteger())))))),
----------------
zwuis wrote:
Seems unnecessary. If I remember correctly `string` doesn't have a constructor
taking 3 integers.
https://github.com/llvm/llvm-project/pull/180337
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits