Skip to content

Commit 675bf80

Browse files
[Basic] Remove a redundant std::string::c_str (NFC) (#168015)
defineMacro takes Twine, which can be constructed from const std::string &. Identified with readability-redundant-string-cstr.
1 parent 9efe517 commit 675bf80

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/Basic/Targets/SystemZ.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ void SystemZTargetInfo::getTargetDefines(const LangOptions &Opts,
205205
Librel |= V.getSubminor().value_or(0);
206206
Str += llvm::utohexstr(Librel);
207207

208-
Builder.defineMacro("__TARGET_LIB__", Str.c_str());
208+
Builder.defineMacro("__TARGET_LIB__", Str);
209209
}
210210
}
211211

0 commit comments

Comments
 (0)