[PATCH] D42638: [clangd] Add a fallback directory for collected symbols with relative paths.

Eric Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 29 07:14:06 PST 2018


ioeric added inline comments.


================
Comment at: clangd/global-symbol-builder/GlobalSymbolBuilderMain.cpp:41
+    llvm::cl::desc(
+        "For symbols' file paths that cannot be resolved to absolute "
+        "paths (i.e. in-memory VFS without absolute paths), "
----------------
sammccall wrote:
> I have trouble understanding this.
> 
> "fallback dir" is maybe too vague a name for this flag - "assume-header-directory" or "header-base-dir" or something?
> 
> The description assumes some context about the problem - can we provide it?
> Maybe:
>   The index includes the header that a symbol is defined in.
>   If the absolute path cannot be determined (e.g. an in-memory VFS) then
>   the relative path is resolved against this directory, which must be absolute.
>   If this flag is not given, such headers will have relative paths.
Thanks for the suggestion! Let's go with `--assume-header-dir`.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D42638





More information about the cfe-commits mailing list