[all-commits] [llvm/llvm-project] a8fe21: [clang] Handle instantiated members to determine v...

Andrew Savonichev via All-commits all-commits at lists.llvm.org
Fri Apr 18 04:29:40 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a8fe21f3f502a49cb05b69b0d6fa74472b93888a
      https://github.com/llvm/llvm-project/commit/a8fe21f3f502a49cb05b69b0d6fa74472b93888a
  Author: Andrew Savonichev <andrew.savonichev at gmail.com>
  Date:   2025-04-18 (Fri, 18 Apr 2025)

  Changed paths:
    M clang/lib/AST/Decl.cpp
    M clang/test/CodeGenCXX/visibility.cpp

  Log Message:
  -----------
  [clang] Handle instantiated members to determine visibility (#136128)

As reported in issue #103477, visibility of instantiated member
functions used to be ignored when calculating visibility of a
specialization.

This patch modifies `getLVForClassMember` to look up for a source
template for an instantiated member, and changes `mergeTemplateLV` to
apply it.

A similar issue was reported in #31462, but it seems that `extern`
declaration with visibility prevents the function from being emitted as
hidden. This behavior seems correct, even though GCC emits it as with
default visibility instead.

Both tests from #103477 and #31462 are added as LIT tests `test72` and
`test73` respectively.



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