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:
Chandler Carruth 2016-11-03 17:42:32 +00:00
parent 5589aa60c7
commit 0349f26226
1 changed files with 1 additions and 1 deletions

View File

@ -43,7 +43,7 @@ VerifyDiagnosticConsumer::~VerifyDiagnosticConsumer() {
assert(!CurrentPreprocessor && "CurrentPreprocessor should be invalid!");
SrcManager = nullptr;
CheckDiagnostics();
Diags.takeClient().release();
Diags.takeClient().reset();
}
#ifndef NDEBUG