From 76f52e0abbd568aa86acc0b5492fe456c7f38d3f Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Thu, 10 Sep 2026 19:12:00 +0000 Subject: [PATCH] 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. --- common/raw_string_ostream.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/common/raw_string_ostream.h b/common/raw_string_ostream.h index 210c3ff2391c..814316f62de9 100644 --- a/common/raw_string_ostream.h +++ b/common/raw_string_ostream.h @@ -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_; };