[PATCH] D38639: [clangd] #include statements support for Open definition
Marc-Andre Laperle via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 13 21:42:32 PST 2018
malaperle added inline comments.
================
Comment at: unittests/clangd/XRefsTests.cpp:245
+ const char *SourceContents = R"cpp(
+ #include "$2^invalid.h"
+ #include "^foo.h"
----------------
ilya-biryukov wrote:
> Could we also add tests for corner cases: cursor before opening quote, cursor after the closing quote, cursor in the middle of `#include` token? (we shouldn't navigate anywhere in the middle of the #include token)
> cursor before opening quote, cursor after the closing quote
I assume we don't want to navigate anywhere for these positions? I don't have an opinion.
> (we shouldn't navigate anywhere in the middle of the #include token)
It did in CDT and I thought it worked nicely as it made it easier to click on it. You can hold ctrl on the whole line and it underlined it (well except trailing comments). But clients don't handle the spaces nicely (underline between #include and file name) so I thought I'd work on the client first before making the server do it. Anyhow, for now it shouldn't navigate indeed.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D38639
More information about the cfe-commits
mailing list