[llvm] e0653ba - [Support] Remove redundant declarations (NFC) (#166106)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 2 22:42:50 PST 2025
Author: Kazu Hirata
Date: 2025-11-02T22:42:47-08:00
New Revision: e0653baa2412a0dedd333dd83b578691b44f564d
URL: https://github.com/llvm/llvm-project/commit/e0653baa2412a0dedd333dd83b578691b44f564d
DIFF: https://github.com/llvm/llvm-project/commit/e0653baa2412a0dedd333dd83b578691b44f564d.diff
LOG: [Support] Remove redundant declarations (NFC) (#166106)
In C++17, static constexpr members are implicitly inline, so they no
longer require an out-of-line definition.
Identified with readability-redundant-declaration.
Added:
Modified:
llvm/lib/Support/BranchProbability.cpp
llvm/unittests/Support/raw_ostream_proxy_test.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Support/BranchProbability.cpp b/llvm/lib/Support/BranchProbability.cpp
index ea42f34b58645..143e58a05d3b7 100644
--- a/llvm/lib/Support/BranchProbability.cpp
+++ b/llvm/lib/Support/BranchProbability.cpp
@@ -20,8 +20,6 @@
using namespace llvm;
-constexpr uint32_t BranchProbability::D;
-
raw_ostream &BranchProbability::print(raw_ostream &OS) const {
if (isUnknown())
return OS << "?%";
diff --git a/llvm/unittests/Support/raw_ostream_proxy_test.cpp b/llvm/unittests/Support/raw_ostream_proxy_test.cpp
index 864dda712aac8..446e64aa1ff59 100644
--- a/llvm/unittests/Support/raw_ostream_proxy_test.cpp
+++ b/llvm/unittests/Support/raw_ostream_proxy_test.cpp
@@ -40,8 +40,6 @@ class BufferedNoPwriteSmallVectorStream : public raw_ostream {
bool IsDisplayed = false;
};
-constexpr size_t BufferedNoPwriteSmallVectorStream::PreferredBufferSize;
-
TEST(raw_ostream_proxyTest, write) {
// Besides confirming that "write" works, this test confirms that the proxy
// takes on the buffer from the stream it's proxying, such that writes to the
More information about the llvm-commits
mailing list