rjmccall added inline comments. ================ Comment at: lib/Sema/SemaTemplate.cpp:7829 @@ -7828,2 +7828,3 @@ UnresolvedSet<8> Matches; + FunctionDecl *Specialization = nullptr; TemplateSpecCandidateSet FailedCandidates(D.getIdentifierLoc()); ---------------- Please name this variable NonTemplateMatch instead of Specialization, then initialize the later Specialization variable to it if it's non-null. That's more self-documenting, and it avoids readability problems with the fact that this loop actually declares its own Specialization variable that would shadow this one.
Please also rename Matches to TemplateMatches. ================ Comment at: lib/Sema/SemaTemplate.cpp:7838 @@ -7836,6 +7837,3 @@ if (Context.hasSameUnqualifiedType(Method->getType(), Adjusted)) { - Matches.clear(); - - Matches.addDecl(Method, P.getAccess()); - if (Method->getTemplateSpecializationKind() == TSK_Undeclared) - break; + if (cast<FunctionDecl>(Method)->getPrimaryTemplate()){ + Matches.clear(); ---------------- This cast shouldn't be necessary. CXXMethodDecl is a subclass of FunctionDecl. http://reviews.llvm.org/D17215 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits