mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-18 15:36:58 +00:00
[AST] Migrate away from PointerUnion::dyn_cast (NFC) (#124430)
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.
This commit is contained in:
parent
563c7c5539
commit
04d5608057
@ -1801,8 +1801,7 @@ TemplateParameterList *clang::getReplacedTemplateParameterList(Decl *D) {
|
||||
case Decl::Kind::VarTemplateSpecialization: {
|
||||
const auto *VTSD = cast<VarTemplateSpecializationDecl>(D);
|
||||
auto P = VTSD->getSpecializedTemplateOrPartial();
|
||||
if (const auto *VTPSD =
|
||||
P.dyn_cast<VarTemplatePartialSpecializationDecl *>())
|
||||
if (const auto *VTPSD = dyn_cast<VarTemplatePartialSpecializationDecl *>(P))
|
||||
return VTPSD->getTemplateParameters();
|
||||
return cast<VarTemplateDecl *>(P)->getTemplateParameters();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user