diff options
Diffstat (limited to 'clang-tools-extra/clangd/URI.h')
| -rw-r--r-- | clang-tools-extra/clangd/URI.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang-tools-extra/clangd/URI.h b/clang-tools-extra/clangd/URI.h index ed54dd1fc7e..cbde008b886 100644 --- a/clang-tools-extra/clangd/URI.h +++ b/clang-tools-extra/clangd/URI.h @@ -64,6 +64,13 @@ public: static llvm::Expected<std::string> resolve(const URI &U, llvm::StringRef HintPath = ""); + /// Resolves \p AbsPath into a canonical path of its URI, by converting + /// \p AbsPath to URI and resolving the URI to get th canonical path. + /// This ensures that paths with the same URI are resolved into consistent + /// file path. + static llvm::Expected<std::string> resolvePath(llvm::StringRef AbsPath, + llvm::StringRef HintPath = ""); + /// Gets the preferred spelling of this file for #include, if there is one, /// e.g. <system_header.h>, "path/to/x.h". /// |

