Skip to content

Commit 80e0cba

Browse files
[ByteCode] Migrate away from PointerUnion::dyn_cast (NFC) (#123445)
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 D to be nonnull.
1 parent 02a56c4 commit 80e0cba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/AST/ByteCode/Program.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ unsigned Program::getOrCreateDummy(const DeclTy &D) {
155155

156156
QualType QT;
157157
bool IsWeak = false;
158-
if (const auto *E = D.dyn_cast<const Expr *>()) {
158+
if (const auto *E = dyn_cast<const Expr *>(D)) {
159159
QT = E->getType();
160160
} else {
161161
const ValueDecl *VD = cast<ValueDecl>(cast<const Decl *>(D));

0 commit comments

Comments
 (0)