Skip to content

Commit f5736ae

Browse files
[Sema] Migrate away from PointerUnion::dyn_cast (NFC) (#123284)
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 Stored to be nonnull.
1 parent 3f07af9 commit f5736ae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/Sema/SemaTemplateInstantiate.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4661,7 +4661,7 @@ void LocalInstantiationScope::InstantiatedLocal(const Decl *D, Decl *Inst) {
46614661
}
46624662
#endif
46634663
Stored = Inst;
4664-
} else if (DeclArgumentPack *Pack = Stored.dyn_cast<DeclArgumentPack *>()) {
4664+
} else if (DeclArgumentPack *Pack = dyn_cast<DeclArgumentPack *>(Stored)) {
46654665
Pack->push_back(cast<VarDecl>(Inst));
46664666
} else {
46674667
assert(cast<Decl *>(Stored) == Inst && "Already instantiated this local");

0 commit comments

Comments
 (0)