Move reserveExtraSpace to public (#7755)

The method it overrides in the base class is public, so it's already
accessible publicly. This is warned against in clang-tidy 24.
This commit is contained in:
Dana Jansens
2026-09-10 19:12:00 +00:00
committed by GitHub
parent bf8c997581
commit 76f52e0abb
+4 -4
View File
@@ -39,6 +39,10 @@ class RawStringOstream : public llvm::raw_pwrite_stream {
auto empty() -> bool { return str_.empty(); }
auto size() -> size_t { return str_.size(); }
auto reserveExtraSpace(uint64_t extra_size) -> void override {
str_.reserve(str_.size() + extra_size);
}
private:
auto current_pos() const -> uint64_t override { return str_.size(); }
@@ -51,10 +55,6 @@ class RawStringOstream : public llvm::raw_pwrite_stream {
str_.append(ptr, size);
}
auto reserveExtraSpace(uint64_t extra_size) -> void override {
str_.reserve(str_.size() + extra_size);
}
// The actual buffer.
std::string str_;
};