Skip to content

Commit c8ba57e

Browse files
[AST] Migrate away from PointerUnion::dyn_cast (NFC) (llvm#125157)
Note that PointerUnion::dyn_cast has been soft deprecated in PointerUnion.h: // FIXME: Replace the uses of is(), get() and dyn_cast() with // isa<T>, cast<T> and the llvm::dyn_cast<T> Literal migration would result in dyn_cast_if_present (see the definition of PointerUnion::dyn_cast), but this patch uses dyn_cast because we expect NodeOrVector to be nonnull.
1 parent 5fbb8dd commit c8ba57e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/AST/ParentMapContext.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ class ParentMapContext::ParentMap::ASTVisitor
395395
if (!isa<ParentVector *>(NodeOrVector)) {
396396
auto *Vector = new ParentVector(
397397
1, getSingleDynTypedNodeFromParentMap(NodeOrVector));
398-
delete NodeOrVector.template dyn_cast<DynTypedNode *>();
398+
delete dyn_cast<DynTypedNode *>(NodeOrVector);
399399
NodeOrVector = Vector;
400400
}
401401

0 commit comments

Comments
 (0)