mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-30 22:02:41 +01:00
We can't completely remove std::string from diagnostics because it's probably better to provide a string than something like a StringLiteralValueId or NameId (because those may be opaque for someone trying to present the diagnostic). So this change is just playing whackamole on another couple things that could easily use the new format providers.
34 lines
938 B
Python
34 lines
938 B
Python
# Part of the Carbon Language project, under the Apache License v2.0 with LLVM
|
|
# Exceptions. See /LICENSE for license information.
|
|
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
|
|
load("@rules_cc//cc:defs.bzl", "cc_library", "cc_test")
|
|
|
|
package(default_visibility = ["//visibility:public"])
|
|
|
|
cc_library(
|
|
name = "source_buffer",
|
|
srcs = ["source_buffer.cpp"],
|
|
hdrs = ["source_buffer.h"],
|
|
deps = [
|
|
"//common:error",
|
|
"//toolchain/diagnostics:diagnostic_emitter",
|
|
"//toolchain/diagnostics:format_providers",
|
|
"@llvm-project//llvm:Support",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "source_buffer_test",
|
|
size = "small",
|
|
srcs = ["source_buffer_test.cpp"],
|
|
deps = [
|
|
":source_buffer",
|
|
"//common:check",
|
|
"//testing/base:gtest_main",
|
|
"//toolchain/diagnostics:diagnostic_emitter",
|
|
"@googletest//:gtest",
|
|
"@llvm-project//llvm:Support",
|
|
],
|
|
)
|