Skip to content

Commit ba5b146

Browse files
[AST] Migrate away from PointerUnion::dyn_cast (NFC) (llvm#125022)
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 C to be nonnull.
1 parent adb9ef0 commit ba5b146

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clang/lib/AST/TextNodeDumper.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -958,9 +958,9 @@ void TextNodeDumper::dumpAccessSpecifier(AccessSpecifier AS) {
958958

959959
void TextNodeDumper::dumpCleanupObject(
960960
const ExprWithCleanups::CleanupObject &C) {
961-
if (auto *BD = C.dyn_cast<BlockDecl *>())
961+
if (auto *BD = dyn_cast<BlockDecl *>(C))
962962
dumpDeclRef(BD, "cleanup");
963-
else if (auto *CLE = C.dyn_cast<CompoundLiteralExpr *>())
963+
else if (auto *CLE = dyn_cast<CompoundLiteralExpr *>(C))
964964
AddChild([=] {
965965
OS << "cleanup ";
966966
{

0 commit comments

Comments
 (0)