Skip to content

Commit 657dc6d

Browse files
[AST] Migrate away from PointerUnion::dyn_cast (NFC) (llvm#125335)
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 InVectors.front() and P to be nonnull.
1 parent 16d4453 commit 657dc6d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/AST/TemplateName.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ TemplateName::TemplateName(DeducedTemplateStorage *Deduced)
144144
bool TemplateName::isNull() const { return Storage.isNull(); }
145145

146146
TemplateName::NameKind TemplateName::getKind() const {
147-
if (auto *ND = Storage.dyn_cast<Decl *>()) {
147+
if (auto *ND = dyn_cast<Decl *>(Storage)) {
148148
if (isa<UsingShadowDecl>(ND))
149149
return UsingTemplate;
150150
assert(isa<TemplateDecl>(ND));

0 commit comments

Comments
 (0)