[PATCH] D46943: [clangd] Boost scores for decls from current file in completion
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 4 08:10:14 PDT 2018
sammccall added inline comments.
================
Comment at: unittests/clangd/QualityTests.cpp:129
+ Test.Code = R"cpp(
+ #include "foo.h"
+ int ::test_func_in_header_and_cpp() {
----------------
ilya-biryukov wrote:
> sammccall wrote:
> > this is not needed, the `#include` is implicit in TestTU
> >
> > (and so you don't need to specify HeaderFilename either)
> Done.
>
> I did not expect the `TestTU` to do that, actually. Is this implicit `#include` something we want?
> Maybe we should just have a default convention for naming the headers instead and the default `Code` value that only includes the header?
> E.g. say that a file `test_header.h` is provided by TestTU and let the tests specify `#include "test_header.h"` if needed. WDYT?
Missed this - definitely making sure there's a #include in the cc file that lines up to the name/location of the header file is one of the main things I wanted this helper to do. Maybe the documentation can be more clear?
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D46943
More information about the cfe-commits
mailing list