mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-03 20:05:49 +01:00
Switch SourceBuffer to diagnostics. (#3197)
This updates SourceBuffer to diagnostics. Some additional edits to diagnostics were necessary due to issues moving arguments around, which seems to stem from a compile error with clang 14 (fixed in later versions). --------- Co-authored-by: Richard Smith <richard@metafoo.co.uk>
This commit is contained in:
co-authored by
Richard Smith
parent
71e9fb7511
commit
bc63e6ae0a
@@ -94,7 +94,7 @@ void LanguageServer::OnDocumentSymbol(
|
||||
vfs.addFile(file, /*mtime=*/0,
|
||||
llvm::MemoryBuffer::getMemBufferCopy(files_.at(file)));
|
||||
|
||||
auto buf = SourceBuffer::CreateFromFile(vfs, llvm::nulls(), file);
|
||||
auto buf = SourceBuffer::CreateFromFile(vfs, file, NullDiagnosticConsumer());
|
||||
auto lexed = Lex::TokenizedBuffer::Lex(*buf, NullDiagnosticConsumer());
|
||||
auto parsed = Parse::Tree::Parse(lexed, NullDiagnosticConsumer(), nullptr);
|
||||
std::vector<clang::clangd::DocumentSymbol> result;
|
||||
|
||||
Reference in New Issue
Block a user