Nebiroth marked 5 inline comments as done.
Nebiroth added inline comments.

================
Comment at: clangd/ClangdLSPServer.cpp:234
+  else
+    ResultUri = URI::fromFile("");
+
----------------
ilya-biryukov wrote:
> Running `unparse` on an instance created via `URI::fromFile("")`  will result 
> in `"file:///"`. 
> 
> Have you considered returning a list of paths as a result from 
> `switchHeaderSource`?
> That way you could capture the "no file matched" case with an empty list.
> Later when an implementation will look into index, that would allow to return 
> multiple source files for a header file, which also  happens in some C++ 
> projects.
> 
> Returning an empty string is also an option we could start with.
I think I will start by returning an empty string for now. Returning a list of 
paths sounds like a good idea once an indexer is implemented, but that would 
require changing some parts of the code like find_if which returns only the 
first instance of a match.


https://reviews.llvm.org/D36150



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

Reply via email to