diff options
-rw-r--r-- | clang-tools-extra/clangd/SourceCode.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/clang-tools-extra/clangd/SourceCode.cpp b/clang-tools-extra/clangd/SourceCode.cpp index e52588d6aa8..d505645a74f 100644 --- a/clang-tools-extra/clangd/SourceCode.cpp +++ b/clang-tools-extra/clangd/SourceCode.cpp @@ -719,9 +719,10 @@ cleanupAndFormat(StringRef Code, const tooling::Replacements &Replaces, 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); |