[PATCH] Implementation for completion in call context for C++
Manuel Klimek
klimek at google.com
Wed Jan 14 00:51:52 PST 2015
================
Comment at: lib/Sema/SemaOverload.cpp:5854
@@ -5852,2 +5853,3 @@
OverloadCandidateSet& CandidateSet,
+ TemplateArgumentListInfo *ExplicitTemplateArgs,
bool SuppressUserConversions,
----------------
Indent.
================
Comment at: lib/Sema/SemaOverload.cpp:5860-5861
@@ -5857,3 +5859,4 @@
if (FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) {
- if (isa<CXXMethodDecl>(FD) && !cast<CXXMethodDecl>(FD)->isStatic())
+ if (isa<CXXMethodDecl>(FD) && !cast<CXXMethodDecl>(FD)->isStatic() &&
+ !isa<CXXConstructorDecl>(FD))
AddMethodCandidate(cast<CXXMethodDecl>(FD), F.getPair(),
----------------
Here and elsewhere: this looks like it actually changes overload resolution, but I didn't see a description about that change in the change comment - what am I missing?
================
Comment at: lib/Sema/SemaOverload.cpp:5968
@@ -5960,2 +5967,3 @@
// list (8.3.5).
- if (Args.size() > NumParams && !Proto->isVariadic()) {
+ if ((Args.size() + (PartialOverloading && Args.size())) > NumParams &&
+ !Proto->isVariadic()) {
----------------
This is a little too clever for me :)
a) comment on why we need to +1 when PartialOverloading
b) pull it out of the if into a variable?
http://reviews.llvm.org/D6880
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the cfe-commits
mailing list