diff --git a/clang/lib/AST/ParentMapContext.cpp b/clang/lib/AST/ParentMapContext.cpp index 2e77e1d7c4c64..e9387ec79c373 100644 --- a/clang/lib/AST/ParentMapContext.cpp +++ b/clang/lib/AST/ParentMapContext.cpp @@ -395,7 +395,7 @@ class ParentMapContext::ParentMap::ASTVisitor if (!isa(NodeOrVector)) { auto *Vector = new ParentVector( 1, getSingleDynTypedNodeFromParentMap(NodeOrVector)); - delete NodeOrVector.template dyn_cast(); + delete dyn_cast(NodeOrVector); NodeOrVector = Vector; }