diff --git a/dist/clang/patches/200_D36390_Fix-overloaded-static-functions-in-SemaCodeComplete.patch b/dist/clang/patches/200_D36390_Fix-overloaded-static-functions-in-SemaCodeComplete.patch index 3e5bfe553f3..316f3afd178 100644 --- a/dist/clang/patches/200_D36390_Fix-overloaded-static-functions-in-SemaCodeComplete.patch +++ b/dist/clang/patches/200_D36390_Fix-overloaded-static-functions-in-SemaCodeComplete.patch @@ -1,5 +1,5 @@ ---- a/include/clang/Sema/Sema.h -+++ b/include/clang/Sema/Sema.h +--- a/tools/clang/include/clang/Sema/Sema.h ++++ b/tools/clang/include/clang/Sema/Sema.h @@ -2707,7 +2707,8 @@ OverloadCandidateSet &CandidateSet, TemplateArgumentListInfo *ExplicitTemplateArgs = nullptr, @@ -10,8 +10,8 @@ void AddMethodCandidate(DeclAccessPair FoundDecl, QualType ObjectType, Expr::Classification ObjectClassification, ---- a/lib/Sema/SemaCodeComplete.cpp -+++ b/lib/Sema/SemaCodeComplete.cpp +--- a/tools/clang/lib/Sema/SemaCodeComplete.cpp ++++ b/tools/clang/lib/Sema/SemaCodeComplete.cpp @@ -4396,9 +4396,11 @@ ArgExprs.append(Args.begin(), Args.end()); UnresolvedSet<8> Decls; @@ -25,8 +25,8 @@ } else { FunctionDecl *FD = nullptr; if (auto MCE = dyn_cast(NakedFn)) ---- a/lib/Sema/SemaOverload.cpp -+++ b/lib/Sema/SemaOverload.cpp +--- a/tools/clang/lib/Sema/SemaOverload.cpp ++++ b/tools/clang/lib/Sema/SemaOverload.cpp @@ -6343,24 +6343,36 @@ OverloadCandidateSet& CandidateSet, TemplateArgumentListInfo *ExplicitTemplateArgs, @@ -72,8 +72,8 @@ SuppressUserConversions, PartialOverloading); } } else { ---- a/test/Index/complete-call.cpp -+++ b/test/Index/complete-call.cpp +--- a/tools/clang/test/Index/complete-call.cpp ++++ b/tools/clang/test/Index/complete-call.cpp @@ -94,6 +94,24 @@ s.foo_7(42,); } diff --git a/dist/clang/patches/210_D43453_Fix-overloaded-static-functions-for-templates.patch b/dist/clang/patches/210_D43453_Fix-overloaded-static-functions-for-templates.patch index 2296904f7dd..0223c96e784 100644 --- a/dist/clang/patches/210_D43453_Fix-overloaded-static-functions-for-templates.patch +++ b/dist/clang/patches/210_D43453_Fix-overloaded-static-functions-for-templates.patch @@ -1,8 +1,8 @@ -diff --git a/lib/Sema/SemaOverload.cpp b/lib/Sema/SemaOverload.cpp +diff --git a/tools/clang/lib/Sema/SemaOverload.cpp b/lib/Sema/SemaOverload.cpp index 1b07ec60ce..46ed08d1cf 100644 ---- a/lib/Sema/SemaOverload.cpp -+++ b/lib/Sema/SemaOverload.cpp -@@ -6371,57 +6371,54 @@ void Sema::AddFunctionCandidates(const UnresolvedSetImpl &Fns, +--- a/tools/clang/lib/Sema/SemaOverload.cpp ++++ b/tools/clang/lib/Sema/SemaOverload.cpp +@@ -6321,57 +6321,56 @@ void Sema::AddFunctionCandidates(const UnresolvedSetImpl &Fns, bool FirstArgumentIsBase) { for (UnresolvedSetIterator F = Fns.begin(), E = Fns.end(); F != E; ++F) { NamedDecl *D = F.getDecl()->getUnderlyingDecl(); @@ -56,8 +56,7 @@ index 1b07ec60ce..46ed08d1cf 100644 + Expr::Classification ObjectClassification; + if (Args.size() > 0) { if (Expr *E = Args[0]) { -- // Use the explit base to restrict the lookup: -+ // Use the explicit base to restrict the lookup: + // Use the explit base to restrict the lookup: ObjectType = E->getType(); ObjectClassification = E->Classify(Context); } // .. else there is an implit base. @@ -65,19 +64,17 @@ index 1b07ec60ce..46ed08d1cf 100644 + } + if (IsTemplate) AddMethodTemplateCandidate( -- FunTmpl, F.getPair(), -- cast(FunTmpl->getDeclContext()), -- ExplicitTemplateArgs, ObjectType, ObjectClassification, + FunTmpl, F.getPair(), + cast(FunTmpl->getDeclContext()), + ExplicitTemplateArgs, ObjectType, ObjectClassification, - Args.slice(1), CandidateSet, SuppressUserConversions, -- PartialOverloading); ++ FunctionArgs, CandidateSet, SuppressUserConversions, + PartialOverloading); - } else { - AddTemplateOverloadCandidate(FunTmpl, F.getPair(), - ExplicitTemplateArgs, Args, - CandidateSet, SuppressUserConversions, - PartialOverloading); -+ FunTmpl, F.getPair(), cast(FD), ExplicitTemplateArgs, -+ ObjectType, ObjectClassification, FunctionArgs, CandidateSet, -+ SuppressUserConversions, PartialOverloading); + else + AddMethodCandidate(cast(FD), F.getPair(), + cast(FD)->getParent(), ObjectType, @@ -102,10 +99,10 @@ index 1b07ec60ce..46ed08d1cf 100644 } } } -diff --git a/test/Index/complete-call.cpp b/test/Index/complete-call.cpp +diff --git a/tools/clang/test/Index/complete-call.cpp b/test/Index/complete-call.cpp index ca116485ac..35f2009066 100644 ---- a/test/Index/complete-call.cpp -+++ b/test/Index/complete-call.cpp +--- a/tools/clang/test/Index/complete-call.cpp ++++ b/tools/clang/test/Index/complete-call.cpp @@ -112,6 +112,33 @@ struct Bar2 : public Bar { } };