[all-commits] [llvm/llvm-project] c6eb26: [Clang] Fix mergeInheritableAttributes() to propag...
kevin1108 via All-commits
all-commits at lists.llvm.org
Wed May 6 23:37:12 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c6eb268dd15fa8e13d7c3beb8887fec0bb14f5f0
https://github.com/llvm/llvm-project/commit/c6eb268dd15fa8e13d7c3beb8887fec0bb14f5f0
Author: kevin1108 <kevinlzh1108 at gmail.com>
Date: 2026-05-06 (Wed, 06 May 2026)
Changed paths:
M clang/lib/Serialization/ASTReaderDecl.cpp
M clang/test/Modules/decl-attr-merge.mm
Log Message:
-----------
[Clang] Fix mergeInheritableAttributes() to propagate all AvailabilityAttrs (#181482)
`getAttr<AvailabilityAttr>()` only returns the first matching attribute,
but a declaration can carry multiple AvailabilityAttrs (one per
platform, e.g. macOS + iOS). Use `specific_attrs<AvailabilityAttr>()`
to iterate over all of them so every platform's availability is
propagated during cross-module redeclaration merging.
This aligns the PCM merge path with how `mergeDeclAttributes` already
iterates via `specific_attrs<InheritableAttr>()` on the Sema side.
Extend clang/test/Modules/decl-attr-merge.mm with a multi-platform
case and an iOS triple RUN line that triggers the bug without the fix.
Fixes https://github.com/llvm/llvm-project/issues/181298
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list