Skip to content

Commit c969964

Browse files
[AST] Migrate away from PointerUnion::dyn_cast (NFC) (#123156)
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 IntegerType to be nonnull.
1 parent ff1b01b commit c969964

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/include/clang/AST/Decl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4021,7 +4021,7 @@ class EnumDecl : public TagDecl {
40214021
QualType getIntegerType() const {
40224022
if (!IntegerType)
40234023
return QualType();
4024-
if (const Type *T = IntegerType.dyn_cast<const Type*>())
4024+
if (const Type *T = dyn_cast<const Type *>(IntegerType))
40254025
return QualType(T, 0);
40264026
return cast<TypeSourceInfo *>(IntegerType)->getType().getUnqualifiedType();
40274027
}

0 commit comments

Comments
 (0)