]> granicus.if.org Git - clang/commitdiff
Remove unnecessary condition as suggested by clang-tidy. NFC
authorGabor Horvath <xazax.hun@gmail.com>
Wed, 19 Apr 2017 15:11:10 +0000 (15:11 +0000)
committerGabor Horvath <xazax.hun@gmail.com>
Wed, 19 Apr 2017 15:11:10 +0000 (15:11 +0000)
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

index 7b337b061a031eb1ce9add4d37a3003f2222ca69..4626052a8acb3223a52edc9bf57dcffdd7a71ed5 100644 (file)
@@ -9414,10 +9414,8 @@ createDynTypedNode(const NestedNameSpecifierLoc &Node) {
           if (!NodeOrVector.template is<ASTContext::ParentVector *>()) {
             auto *Vector = new ASTContext::ParentVector(
                 1, getSingleDynTypedNodeFromParentMap(NodeOrVector));
-            if (auto *Node =
-                    NodeOrVector
-                        .template dyn_cast<ast_type_traits::DynTypedNode *>())
-              delete Node;
+            delete NodeOrVector
+                    .template dyn_cast<ast_type_traits::DynTypedNode *>();
             NodeOrVector = Vector;
           }