Skip to content

Commit 3df9873

Browse files
committed
Change ArgText to type StringRef
1 parent 6abf8a2 commit 3df9873

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

clang-tools-extra/clang-tidy/modernize/MinMaxUseInitializerListCheck.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,11 +124,10 @@ generateReplacement(const MatchFinder::MatchResult &Match,
124124
if (ArgType == ResultType)
125125
continue;
126126

127-
const std::string ArgText =
127+
const StringRef ArgText =
128128
Lexer::getSourceText(
129129
CharSourceRange::getTokenRange(Arg->getSourceRange()), SourceMngr,
130-
LanguageOpts)
131-
.str();
130+
LanguageOpts);
132131

133132
Twine Replacement = llvm::Twine("static_cast<")
134133
.concat(ResultType.getAsString(LanguageOpts))

0 commit comments

Comments
 (0)