Skip to content

Commit 16e61df

Browse files
[Sema] Migrate away from PointerUnion::dyn_cast (NFC) (llvm#125023)
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 Entry to be nonnull.
1 parent ba5b146 commit 16e61df

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/Sema/SemaDecl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19966,7 +19966,7 @@ static void CheckForDuplicateEnumValues(Sema &S, ArrayRef<Decl *> Elements,
1996619966
continue;
1996719967

1996819968
DeclOrVector& Entry = Iter->second;
19969-
if (EnumConstantDecl *D = Entry.dyn_cast<EnumConstantDecl*>()) {
19969+
if (EnumConstantDecl *D = dyn_cast<EnumConstantDecl *>(Entry)) {
1997019970
// Ensure constants are different.
1997119971
if (D == ECD)
1997219972
continue;

0 commit comments

Comments
 (0)