forked from OSchip/llvm-project
Patch by Argiris Kirtzidis: Fix a dangling pointer error!
llvm-svn: 49057
This commit is contained in:
parent
7f7edc3824
commit
94896e17bb
|
@ -76,10 +76,12 @@ void EmitWarning(Diagnostic& Diag, PathDiagnosticClient* PD,
|
|||
ITERATOR I, ITERATOR E, const char* msg) {
|
||||
|
||||
std::ostringstream Out;
|
||||
std::string Str;
|
||||
|
||||
if (!PD) {
|
||||
Out << "[CHECKER] " << msg;
|
||||
msg = Out.str().c_str();
|
||||
Str = Out.str();
|
||||
msg = Str.c_str();
|
||||
}
|
||||
|
||||
bool isFirst = true;
|
||||
|
|
Loading…
Reference in New Issue