================
@@ -207,11 +211,13 @@ void UseEmplaceCheck::registerMatchers(MatchFinder 
*Finder) {
   auto HasConstructExpr = has(ignoringImplicit(SoughtConstructExpr));
 
   // allow for T{} to be replaced, even if no CTOR is declared
-  auto HasConstructInitListExpr = has(initListExpr(anyOf(
-      allOf(has(SoughtConstructExpr),
-            has(cxxConstructExpr(argumentCountIs(0)))),
-      has(cxxBindTemporaryExpr(has(SoughtConstructExpr),
-                               has(cxxConstructExpr(argumentCountIs(0))))))));
+  auto HasConstructInitListExpr =
+      has(initListExpr(anyOf(initCountIs(0), initCountIs(1)),
----------------
carlosgalvezp wrote:

Nit: would it be simpler/more readable with something like `initCountLeq(1)`?

https://github.com/llvm/llvm-project/pull/66169
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to