[PATCH] D46943: [clangd] Boost scores for decls from current file in completion
Ilya Biryukov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu May 17 05:50:18 PDT 2018
ilya-biryukov added inline comments.
================
Comment at: clangd/AST.h:32
+/// Returns true iff all redecls of \p D are in the main file.
+bool allDeclsInMainFile(const Decl *D);
----------------
sammccall wrote:
> Do you expect this to be reused?
> If so, unit test? Otherwise this seems small enough to move where it's used.
I'd say we could reuse it, yes. Even though the function is pretty straightforward, there are details that should be consistent across the whole codebase (i.e. which locations to check, spelling, expansion?)
I'll add unittests.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D46943
More information about the cfe-commits
mailing list