rsmith added inline comments.
================ Comment at: lib/Sema/SemaExprCXX.cpp:4390-4391 // resolution point. if (isa<FunctionTemplateDecl>(ND)) continue; + // UsingDecl itself is not a constructor ---------------- You also need to handle the case of an inherited constructor template (`isa<FunctionTemplateDecl>(ND->getUnderlyingDecl())` will do the right thing in both cases). ================ Comment at: lib/Sema/SemaExprCXX.cpp:4395-4397 + const CXXConstructorDecl *Constructor = nullptr; + if (auto *CSD = dyn_cast<ConstructorUsingShadowDecl>(ND)) { + Constructor = cast<CXXConstructorDecl>(CSD->getTargetDecl()); ---------------- This is better written as auto *Constructor = cast<CXXConstructorDecl>(ND->getUnderlyingDecl()); ================ Comment at: lib/Sema/SemaExprCXX.cpp:4398-4401 + // Default constructor and copy/move constructor are not inherited. + if (Constructor->isDefaultConstructor() || + Constructor->isCopyOrMoveConstructor()) + continue; ---------------- This is not necessary: Sema has already filtered out the ones that aren't inherited. https://reviews.llvm.org/D23765 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits