dgoldman added inline comments.

================
Comment at: clang-tools-extra/clangd/XRefs.cpp:1528
   }
-
+  auto MainFilePath =
+      getCanonicalPath(SM.getFileEntryForID(SM.getMainFileID()), SM);
----------------
dgoldman wrote:
> sammccall wrote:
> > kadircet wrote:
> > > let's just pass the TUPath from ClangdServer into the request. (we should 
> > > do the same for `locateSymbolAt`, but on a separate change)
> > driveby: @kadircet any reason not to store the TUPath on ParsedAST? We 
> > already pass it to ParsedAST::build()
> I think this would simplify things quite a bit - otherwise I also need to 
> update the DumpSymbol tweak to store/compute the TUPath (or just provide an 
> empty one). LMK what I should do.
Also, not sure how this would affect the Windows failure, which currently fails 
since the decl/definition locations reference 
"file:///C:/clangd-test/simple.cpp" instead of "test:///simple.cpp"... could 
add a regex or limit the test to non-Windows as a work around though. 
"textDocument/publishDiagnostics" also seems to reference that absolute path as 
well instead of the test:// URI


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D130041

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to