forked from OSchip/llvm-project
Using release to free memory is at best confusing -- one would expect
that its result is in fact used. Instead, use reset. This was pointed out by PVS-Studio. llvm-svn: 285946
This commit is contained in:
parent
5589aa60c7
commit
0349f26226
|
@ -43,7 +43,7 @@ VerifyDiagnosticConsumer::~VerifyDiagnosticConsumer() {
|
|||
assert(!CurrentPreprocessor && "CurrentPreprocessor should be invalid!");
|
||||
SrcManager = nullptr;
|
||||
CheckDiagnostics();
|
||||
Diags.takeClient().release();
|
||||
Diags.takeClient().reset();
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
|
|
Loading…
Reference in New Issue