Clang: Fix paths and updated diff for latest clang patches

I forgot that they must be relative to LLVM folder.
Also one patch had a typo and therefore is updated here.

Change-Id: I35241db84c0aa394211dfc7b4d779f8dfac5326a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Ivan Donchevskii
2018-02-23 12:31:37 +01:00
parent 1997692f86
commit 6cf1465ff8
2 changed files with 21 additions and 24 deletions

View File

@@ -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<MemberExpr>(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,);
}

View File

@@ -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<CXXRecordDecl>(FunTmpl->getDeclContext()),
- ExplicitTemplateArgs, ObjectType, ObjectClassification,
FunTmpl, F.getPair(),
cast<CXXRecordDecl>(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<CXXRecordDecl>(FD), ExplicitTemplateArgs,
+ ObjectType, ObjectClassification, FunctionArgs, CandidateSet,
+ SuppressUserConversions, PartialOverloading);
+ else
+ AddMethodCandidate(cast<CXXMethodDecl>(FD), F.getPair(),
+ cast<CXXMethodDecl>(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 {
}
};