[PATCH] D68335: [CodeComplete] Ensure object is the same in compareOverloads()
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 2 07:07:41 PDT 2019
sammccall added inline comments.
================
Comment at: clang-tools-extra/clangd/unittests/CodeCompleteTests.cpp:2565
+ EXPECT_THAT(Completions,
+ ElementsAre(AllOf(ReturnType("int"), Named("size"))));
+}
----------------
could you give the three methods different return types, so it's clearer which one is being selected?
================
Comment at: clang/lib/Sema/SemaCodeComplete.cpp:1188
ExprValueKind ObjectKind) {
+ // This function does not take object type into account.
+ if (Candidate.getDeclContext() != Incumbent.getDeclContext())
----------------
This comment is a little confusing: the very next line takes object type into account :-)
Maybe: `// Base/derived shadowing is handled elsewhere.`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68335/new/
https://reviews.llvm.org/D68335
More information about the cfe-commits
mailing list