llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) <details> <summary>Changes</summary> PointerUnion::dyn_cast has been soft-deprecated in favor of llvm::dyn_cast and llvm::dyn_cast_if_present. This patch replaces the former with llvm::dyn_cast_if_present in FriendTemplateDecl::getFriendDecl. This is the only place under clang/ where migrating to llvm::dyn_cast would trigger an assertion failure during check-clang. Assisted-by: Antigravity --- Full diff: https://github.com/llvm/llvm-project/pull/233191.diff 1 Files Affected: - (modified) clang/include/clang/AST/DeclTemplate.h (+1-1) ``````````diff diff --git a/clang/include/clang/AST/DeclTemplate.h b/clang/include/clang/AST/DeclTemplate.h index 575ca86155742..5724645602d9b 100644 --- a/clang/include/clang/AST/DeclTemplate.h +++ b/clang/include/clang/AST/DeclTemplate.h @@ -2529,7 +2529,7 @@ class FriendTemplateDecl final } NamedDecl *getFriendDecl() const override { - if (NamedDecl *ND = Friend.dyn_cast<NamedDecl *>()) + if (NamedDecl *ND = dyn_cast_if_present<NamedDecl *>(Friend)) return ND; return Template.getAsTemplateDecl(); } `````````` </details> https://github.com/llvm/llvm-project/pull/233191 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
