llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-clang Author: Ivo Popov (ipopov) <details> <summary>Changes</summary> `needsAnonymousDeclarationNumber()` takes a `const NamedDecl *`. Both `BlockDecl` and `NamedDecl` derive from `Decl`, in other words they're siblings. * https://clang.llvm.org/doxygen/classclang_1_1BlockDecl.html * https://clang.llvm.org/doxygen/classclang_1_1NamedDecl.html Thus `isa<BlockDecl>(D)` is statically false. --- Full diff: https://github.com/llvm/llvm-project/pull/206298.diff 1 Files Affected: - (modified) clang/lib/Serialization/ASTCommon.cpp (+1-1) ``````````diff diff --git a/clang/lib/Serialization/ASTCommon.cpp b/clang/lib/Serialization/ASTCommon.cpp index 49e6fe8004cec..cedba86e3267d 100644 --- a/clang/lib/Serialization/ASTCommon.cpp +++ b/clang/lib/Serialization/ASTCommon.cpp @@ -499,7 +499,7 @@ bool serialization::needsAnonymousDeclarationNumber(const NamedDecl *D) { if (auto *VD = dyn_cast<VarDecl>(D)) return VD->isStaticLocal(); // FIXME: What about CapturedDecls (and declarations nested within them)? - return isa<TagDecl, BlockDecl>(D); + return isa<TagDecl>(D); } // Otherwise, we only care about anonymous class members / block-scope decls. `````````` </details> https://github.com/llvm/llvm-project/pull/206298 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
