Index: lib/Sema/SemaOverload.cpp =================================================================== --- lib/Sema/SemaOverload.cpp +++ lib/Sema/SemaOverload.cpp @@ -6429,7 +6429,12 @@ if (Expr *E = Args[0]) { // Use the explicit base to restrict the lookup: ObjectType = E->getType(); - ObjectClassification = E->Classify(Context); + // Pointers in the object arguments are implicitly dereferenced, so we + // always classify them as l-values. + if (!ObjectType.isNull() && ObjectType->isPointerType()) + ObjectClassification = Expr::Classification::makeSimpleLValue(); + else + ObjectClassification = E->Classify(Context); } // .. else there is an implicit base. FunctionArgs = Args.slice(1); } Index: test/CodeCompletion/signatures-crash.cpp =================================================================== --- /dev/null +++ test/CodeCompletion/signatures-crash.cpp @@ -0,0 +1,15 @@ +struct map { + void find(int); + void find(); +}; + +int main() { + map *m; + m->find(10); + // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:8:11 %s -o - | FileCheck %s + // CHECK: find + + // Also check when the lhs is an explicit pr-value. + (m+0)->find(10); + // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:13:15 %s -o - | FileCheck %s +}