[PATCH] D60687: [clangd] Check file path of declaring header when deciding whether to insert include.

Eric Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 16 01:59:24 PDT 2019


ioeric marked an inline comment as done.
ioeric added inline comments.


================
Comment at: unittests/clangd/HeadersTests.cpp:208
 
 TEST_F(HeadersTest, DoNotInsertIfInSameFile) {
   MainFile = testPath("main.h");
----------------
> IIUC, this already fixes the cases we'd seen of include-insertion of a header into itself.
> Is it feasible to add a test case for that?
Here is a test case for it. However, to trigger the old behavior caused by include spelling, we would need to implement a custom URI scheme that performs include spelling customization. Let me know if you think we should add one.



Repository:
  rCTE Clang Tools Extra

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60687/new/

https://reviews.llvm.org/D60687





More information about the cfe-commits mailing list