Skip to content

Commit 3fd296e

Browse files
[AST] Migrate away from PointerUnion::dyn_cast (NFC) (#123012)
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 P to be nonnull.
1 parent ff862d6 commit 3fd296e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/AST/ASTImporter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6376,7 +6376,7 @@ ExpectedDecl ASTNodeImporter::VisitClassTemplateSpecializationDecl(
63766376
D2->setTemplateSpecializationKind(D->getTemplateSpecializationKind());
63776377

63786378
if (auto P = D->getInstantiatedFrom()) {
6379-
if (auto *CTD = P.dyn_cast<ClassTemplateDecl *>()) {
6379+
if (auto *CTD = dyn_cast<ClassTemplateDecl *>(P)) {
63806380
if (auto CTDorErr = import(CTD))
63816381
D2->setInstantiationOf(*CTDorErr);
63826382
} else {

0 commit comments

Comments
 (0)