From 0349f26226d07da6d592005476be702a77894b1b Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Thu, 3 Nov 2016 17:42:32 +0000 Subject: [PATCH] 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 --- clang/lib/Frontend/VerifyDiagnosticConsumer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang/lib/Frontend/VerifyDiagnosticConsumer.cpp b/clang/lib/Frontend/VerifyDiagnosticConsumer.cpp index 7331d77d1c18..57ea9a0f8be7 100644 --- a/clang/lib/Frontend/VerifyDiagnosticConsumer.cpp +++ b/clang/lib/Frontend/VerifyDiagnosticConsumer.cpp @@ -43,7 +43,7 @@ VerifyDiagnosticConsumer::~VerifyDiagnosticConsumer() { assert(!CurrentPreprocessor && "CurrentPreprocessor should be invalid!"); SrcManager = nullptr; CheckDiagnostics(); - Diags.takeClient().release(); + Diags.takeClient().reset(); } #ifndef NDEBUG