From 50b60f1150fcc131b41388fc5ba04215ef757fd7 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Thu, 13 Nov 2025 18:11:52 -0800 Subject: [PATCH] [Basic] Remove a redundant std::string::c_str (NFC) defineMacro takes Twine, which can be constructed from const std::string &. Identified with readability-redundant-string-cstr. --- clang/lib/Basic/Targets/SystemZ.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang/lib/Basic/Targets/SystemZ.cpp b/clang/lib/Basic/Targets/SystemZ.cpp index 30f846cb900f8..ecd12ed34a20c 100644 --- a/clang/lib/Basic/Targets/SystemZ.cpp +++ b/clang/lib/Basic/Targets/SystemZ.cpp @@ -205,7 +205,7 @@ void SystemZTargetInfo::getTargetDefines(const LangOptions &Opts, Librel |= V.getSubminor().value_or(0); Str += llvm::utohexstr(Librel); - Builder.defineMacro("__TARGET_LIB__", Str.c_str()); + Builder.defineMacro("__TARGET_LIB__", Str); } }