[clangd] NFC, hide the internal-only utility function lex.
To avoid any potential ODR violations.
diff --git a/clang-tools-extra/clangd/SourceCode.cpp b/clang-tools-extra/clangd/SourceCode.cpp
index e52588d..d505645 100644
--- a/clang-tools-extra/clangd/SourceCode.cpp
+++ b/clang-tools-extra/clangd/SourceCode.cpp
@@ -719,9 +719,10 @@
return formatReplacements(Code, std::move(*CleanReplaces), Style);
}
-void lex(llvm::StringRef Code, const LangOptions &LangOpts,
- llvm::function_ref<void(const clang::Token &, const SourceManager &SM)>
- Action) {
+static void
+lex(llvm::StringRef Code, const LangOptions &LangOpts,
+ llvm::function_ref<void(const clang::Token &, const SourceManager &SM)>
+ Action) {
// FIXME: InMemoryFileAdapter crashes unless the buffer is null terminated!
std::string NullTerminatedCode = Code.str();
SourceManagerForFile FileSM("dummy.cpp", NullTerminatedCode);