Skip to content

Commit ab895ad

Browse files
[AST] Migrate away from PointerUnion::dyn_cast (NFC) (#124446)
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 Pattern to be nonnull.
1 parent f46eb14 commit ab895ad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/AST/DeclTemplate.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1463,7 +1463,7 @@ SourceRange VarTemplateSpecializationDecl::getSourceRange() const {
14631463
assert(!Pattern.isNull() &&
14641464
"Variable template specialization without pattern?");
14651465
if (const auto *VTPSD =
1466-
Pattern.dyn_cast<VarTemplatePartialSpecializationDecl *>())
1466+
dyn_cast<VarTemplatePartialSpecializationDecl *>(Pattern))
14671467
return VTPSD->getSourceRange();
14681468
VarTemplateDecl *VTD = cast<VarTemplateDecl *>(Pattern);
14691469
if (hasInit()) {

0 commit comments

Comments
 (0)