[PATCH] D60873: [clang][HeaderSuggestion] Handle the case of dotdot with an absolute path

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 18 13:00:09 PDT 2019


sammccall added inline comments.


================
Comment at: clang-tools-extra/unittests/clangd/HeadersTests.cpp:220
+  BarHeader = testPath("sub/bar.h");
+  EXPECT_EQ(calculate(BarHeader), "\"sub/bar.h\"");
 }
----------------
ormris wrote:
> Quick nit: This test won't work on Windows as it only tests for POSIX-style path separators. You could easily add a Windows ifdef, though.
testPath() returns an appropriate native path, and calculate() returns an #include string (which always uses /).
The "../" on line 217 looks a little more suspicious, but I think the clang driver might silently Do What I Mean here.
Are you seeing test failures?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D60873





More information about the cfe-commits mailing list