Skip to content

Commit 20d3afc

Browse files
committed
[DiagnosticVerifier] Fix ASAN issue where Twine was stored to a temporary
1 parent 0366e61 commit 20d3afc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/Frontend/DiagnosticVerifier.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -589,10 +589,10 @@ DiagnosticVerifier::Result DiagnosticVerifier::verifyFile(unsigned BufferID) {
589589
-> ActualFixitsPhrase {
590590
std::string actualFixitsStr = renderFixits(actualFixits, InputFile);
591591

592-
auto phrase = Twine("actual fix-it") +
593-
(actualFixits.size() >= 2 ? "s" : "") +
594-
" seen: " + actualFixitsStr;
595-
return ActualFixitsPhrase{phrase.str(), actualFixitsStr};
592+
return ActualFixitsPhrase{(Twine("actual fix-it") +
593+
(actualFixits.size() >= 2 ? "s" : "") +
594+
" seen: " + actualFixitsStr).str(),
595+
actualFixitsStr};
596596
};
597597

598598
auto emitFixItsError = [&](const char *location, const Twine &message,

0 commit comments

Comments
 (0)