Skip to content

Commit 1a5a8dd

Browse files
authored
Merge pull request #27980 from drodriguez/windows-const-is-your-friend
[Diagnostics] Use constant strings to avoid use after free.
2 parents d3461e1 + 5e54eb1 commit 1a5a8dd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

unittests/AST/DiagnosticConsumerTests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ namespace {
5050
}
5151
};
5252

53-
DiagnosticInfo testDiagnosticInfo(SourceLoc Loc, std::string Message,
53+
DiagnosticInfo testDiagnosticInfo(SourceLoc Loc, const char *Message,
5454
DiagnosticKind Kind) {
5555
return DiagnosticInfo(DiagID(0), Loc, Kind, Message, /*args*/ {},
5656
/*indirectBuffer*/ SourceLoc(), /*childInfo*/ {},

0 commit comments

Comments
 (0)