From 695a41c5a9deec30a843a3e7d4bc3eb83f49488f 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@285946 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Frontend/VerifyDiagnosticConsumer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Frontend/VerifyDiagnosticConsumer.cpp b/lib/Frontend/VerifyDiagnosticConsumer.cpp index 7331d77d1c..57ea9a0f8b 100644 --- a/lib/Frontend/VerifyDiagnosticConsumer.cpp +++ b/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 -- 2.50.1