================
@@ -16,6 +18,25 @@ using namespace clang::ast_matchers;
namespace clang::tidy::modernize {
+static bool hasInitListConstructor(const CXXRecordDecl *RD) {
+ if (RD == nullptr || !RD->hasDefinition())
+ return false;
+ auto IsInitListCtor = [](const CXXConstructorDecl *Ctor) {
+ return Ctor->hasOneParamOrDefaultArgs() &&
+ utils::type_traits::isStdInitializerList(
+ Ctor->getParamDecl(0)->getType().getNonReferenceType());
----------------
zeyi2 wrote:
I think this is already handled by `hasOneParamOrDefaultArgs()`.
https://github.com/llvm/llvm-project/pull/205440
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits