Skip to content

Commit c5e4cf4

Browse files
committed
[clangd] NFC, hide the internal-only utility function lex.
To avoid any potential ODR violations.
1 parent b1b70f6 commit c5e4cf4

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

clang-tools-extra/clangd/SourceCode.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -719,9 +719,10 @@ cleanupAndFormat(StringRef Code, const tooling::Replacements &Replaces,
719719
return formatReplacements(Code, std::move(*CleanReplaces), Style);
720720
}
721721

722-
void lex(llvm::StringRef Code, const LangOptions &LangOpts,
723-
llvm::function_ref<void(const clang::Token &, const SourceManager &SM)>
724-
Action) {
722+
static void
723+
lex(llvm::StringRef Code, const LangOptions &LangOpts,
724+
llvm::function_ref<void(const clang::Token &, const SourceManager &SM)>
725+
Action) {
725726
// FIXME: InMemoryFileAdapter crashes unless the buffer is null terminated!
726727
std::string NullTerminatedCode = Code.str();
727728
SourceManagerForFile FileSM("dummy.cpp", NullTerminatedCode);

0 commit comments

Comments
 (0)