Skip to content

Commit 286f842

Browse files
[Sema] Migrate away from PointerUnion::dyn_cast (NFC) (#123158)
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 AP to be nonnull.
1 parent dea4e61 commit 286f842

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/Sema/SemaFunctionEffects.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ class Analyzer {
567567
while (!VerificationQueue.empty()) {
568568
const Decl *D = VerificationQueue.back();
569569
if (FuncAnalysisPtr AP = DeclAnalysis.lookup(D)) {
570-
if (auto *Pending = AP.dyn_cast<PendingFunctionAnalysis *>()) {
570+
if (auto *Pending = dyn_cast<PendingFunctionAnalysis *>(AP)) {
571571
// All children have been traversed; finish analysis.
572572
finishPendingAnalysis(D, Pending);
573573
}

0 commit comments

Comments
 (0)