[llvm] 08d33ef - [Support] Remove a redundant declaration (NFC) (#166085)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 2 13:15:05 PST 2025
Author: Kazu Hirata
Date: 2025-11-02T13:15:01-08:00
New Revision: 08d33ef51f44b0283a079260233728f54aba5893
URL: https://github.com/llvm/llvm-project/commit/08d33ef51f44b0283a079260233728f54aba5893
DIFF: https://github.com/llvm/llvm-project/commit/08d33ef51f44b0283a079260233728f54aba5893.diff
LOG: [Support] Remove a redundant declaration (NFC) (#166085)
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/StringRef.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Support/StringRef.cpp b/llvm/lib/Support/StringRef.cpp
index b6a2f8aeadccf..2e8fba8cbfa37 100644
--- a/llvm/lib/Support/StringRef.cpp
+++ b/llvm/lib/Support/StringRef.cpp
@@ -17,11 +17,6 @@
using namespace llvm;
-// MSVC emits references to this into the translation units which reference it.
-#ifndef _MSC_VER
-constexpr size_t StringRef::npos;
-#endif
-
// strncasecmp() is not available on non-POSIX systems, so define an
// alternative function here.
static int ascii_strncasecmp(StringRef LHS, StringRef RHS) {
More information about the llvm-commits
mailing list