From a8d0898b8748814196954c708a555897d66bacb5 Mon Sep 17 00:00:00 2001 From: Gabor Horvath Date: Wed, 19 Apr 2017 15:11:10 +0000 Subject: [PATCH] Remove unnecessary condition as suggested by clang-tidy. NFC Patch by: Gergely Angeli! Differential Revision: https://reviews.llvm.org/D31938 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@300703 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/AST/ASTContext.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp index 7b337b061a..4626052a8a 100644 --- a/lib/AST/ASTContext.cpp +++ b/lib/AST/ASTContext.cpp @@ -9414,10 +9414,8 @@ createDynTypedNode(const NestedNameSpecifierLoc &Node) { if (!NodeOrVector.template is()) { auto *Vector = new ASTContext::ParentVector( 1, getSingleDynTypedNodeFromParentMap(NodeOrVector)); - if (auto *Node = - NodeOrVector - .template dyn_cast()) - delete Node; + delete NodeOrVector + .template dyn_cast(); NodeOrVector = Vector; } -- 2.40.0