[llvm] [Support] Remove redundant declarations (NFC) (PR #165971)

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 31 22:39:47 PDT 2025


https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/165971

In C++17, static constexpr members are implicitly inline, so they no
longer require an out-of-line definition.

Identified with readability-redundant-declaration.


>From dd90411611a5fe4a7ff97470924ca9cb16cefa79 Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Thu, 30 Oct 2025 07:43:56 -0700
Subject: [PATCH] [Support] Remove redundant declarations (NFC)

In C++17, static constexpr members are implicitly inline, so they no
longer require an out-of-line definition.

Identified with readability-redundant-declaration.
---
 llvm/lib/Support/APFloat.cpp | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/llvm/lib/Support/APFloat.cpp b/llvm/lib/Support/APFloat.cpp
index e21cf8e13d4dc..e2645fa46bbcd 100644
--- a/llvm/lib/Support/APFloat.cpp
+++ b/llvm/lib/Support/APFloat.cpp
@@ -269,12 +269,6 @@ bool APFloatBase::isRepresentableBy(const fltSemantics &A,
          A.precision <= B.precision;
 }
 
-constexpr RoundingMode APFloatBase::rmNearestTiesToEven;
-constexpr RoundingMode APFloatBase::rmTowardPositive;
-constexpr RoundingMode APFloatBase::rmTowardNegative;
-constexpr RoundingMode APFloatBase::rmTowardZero;
-constexpr RoundingMode APFloatBase::rmNearestTiesToAway;
-
 /* A tight upper bound on number of parts required to hold the value
    pow(5, power) is
 



More information about the llvm-commits mailing list