Skip to content

Commit 8e4c5cb

Browse files
[Serialization] Migrate away from PointerUnion::dyn_cast (NFC) (#124884)
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 DetailRecord to be nonnull.
1 parent 7ab8f28 commit 8e4c5cb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/Serialization/ASTWriterStmt.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ addConstraintSatisfaction(ASTRecordWriter &Record,
475475
if (!Satisfaction.IsSatisfied) {
476476
Record.push_back(Satisfaction.NumRecords);
477477
for (const auto &DetailRecord : Satisfaction) {
478-
auto *E = DetailRecord.dyn_cast<Expr *>();
478+
auto *E = dyn_cast<Expr *>(DetailRecord);
479479
Record.push_back(/* IsDiagnostic */ E == nullptr);
480480
if (E)
481481
Record.AddStmt(E);

0 commit comments

Comments
 (0)