[all-commits] [llvm/llvm-project] 169417: [Clang][Modules] Merge availability attributes on ...

Michael Spencer via All-commits all-commits at lists.llvm.org
Wed Jun 15 17:47:04 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 169417531578501e955f12c79ecb8ff05333ae15
      https://github.com/llvm/llvm-project/commit/169417531578501e955f12c79ecb8ff05333ae15
  Author: Michael Spencer <bigcheesegs at gmail.com>
  Date:   2022-06-15 (Wed, 15 Jun 2022)

  Changed paths:
    M clang/lib/Serialization/ASTReaderDecl.cpp
    A clang/test/Modules/decl-attr-merge.mm

  Log Message:
  -----------
  [Clang][Modules] Merge availability attributes on imported decls

Currently we do not in general merge attributes when importing decls from modules. This patch handles availability, but long term we need to properly handle all attributes.

I tried to use Sema::mergeDeclAttributes, but it caused test crashes as I don't think it expects to be called in this context. We really shouldn't have duplicate code for merging attributes long term, but for now this fixes availability. There's already a TODO for this in the declaration of ASTDeclReader::mergeInheritableAttributes.

Differential Revision: https://reviews.llvm.org/D127182

rdar://85820301




More information about the All-commits mailing list