[PATCH] D36390: Fix overloaded static functions in SemaCodeComplete

Ivan Donchevskii via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 17 04:33:14 PDT 2017

yvvan added inline comments.

Comment at: lib/Sema/SemaOverload.cpp:6342
+                && !isa<CXXConstructorDecl>(FD)) {
+          Args = Args.slice(1);
+        }
nik wrote:
> bkramer wrote:
> > assert that FD is a static method.
> Just stumbled here because I was looking into https://bugs.llvm.org/show_bug.cgi?id=34207
> Some observations
> * Slicing the first argument unconditionally in this branch (without the if at 6340) fixes the issue.
> * The current revision/version of this change does not fix the issue.
> In case the crash is adapted with this patch, fine. Otherwise I'll wait until this one got in and look again at it.
"Slicing the first argument unconditionally in this branch" is not valid because constructors are affected (at least them) where this argument is needed


More information about the cfe-commits mailing list