bkramer added inline comments.
================ Comment at: include/clang/Sema/Sema.h:2681 + bool PartialOverloading = false, + bool ExtraFirstArgument = false); void AddMethodCandidate(DeclAccessPair FoundDecl, ---------------- I'd prefer something like "FirstArgumentIsBase" ================ Comment at: lib/Sema/SemaOverload.cpp:5871 // is irrelevant. + AddMethodCandidate(Method, FoundDecl, Method->getParent(), QualType(), ---------------- Unnecessary whitespace change. ================ Comment at: lib/Sema/SemaOverload.cpp:6339 } else { + // Slice the first argument when we access static method as non-static + if (Args.size() > 0 && ExtraFirstArgument && isa<CXXMethodDecl>(FD) ---------------- Add a comment that the first argument is the base. ================ Comment at: lib/Sema/SemaOverload.cpp:6341 + if (Args.size() > 0 && ExtraFirstArgument && isa<CXXMethodDecl>(FD) + && !isa<CXXConstructorDecl>(FD)) { + Args = Args.slice(1); ---------------- clang-format ================ Comment at: lib/Sema/SemaOverload.cpp:6342 + && !isa<CXXConstructorDecl>(FD)) { + Args = Args.slice(1); + } ---------------- assert that FD is a static method. https://reviews.llvm.org/D36390 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits