diff --git a/clang/lib/AST/JSONNodeDumper.cpp b/clang/lib/AST/JSONNodeDumper.cpp index ddbe2136a671f..36ef1fc8c79db 100644 --- a/clang/lib/AST/JSONNodeDumper.cpp +++ b/clang/lib/AST/JSONNodeDumper.cpp @@ -1537,9 +1537,9 @@ void JSONNodeDumper::VisitExprWithCleanups(const ExprWithCleanups *EWC) { if (EWC->getNumObjects()) { JOS.attributeArray("cleanups", [this, EWC] { for (const ExprWithCleanups::CleanupObject &CO : EWC->getObjects()) - if (auto *BD = CO.dyn_cast()) { + if (auto *BD = dyn_cast(CO)) { JOS.value(createBareDeclRef(BD)); - } else if (auto *CLE = CO.dyn_cast()) { + } else if (auto *CLE = dyn_cast(CO)) { llvm::json::Object Obj; Obj["id"] = createPointerRepresentation(CLE); Obj["kind"] = CLE->getStmtClassName();