[PATCH] D153835: [Sema] Clone VisibilityAttr for functions in template instantiations

2023-08-16 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 550963. MaskRay added a comment. rebase we may not go with this approach, but update to show the test difference Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153835/new/ https://reviews.llvm.org/D153835

[PATCH] D153835: [Sema] Clone VisibilityAttr for functions in template instantiations

2023-07-08 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D153835#4481816 , @rjmccall wrote: > I agree that the change to test51 is the right result, yes. The explicit > visibility attribute on the template declaration should take precedence over > the visibility of the types in

[PATCH] D153835: [Sema] Clone VisibilityAttr for functions in template instantiations

2023-07-07 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. I agree that the change to test51 is the right result, yes. The explicit visibility attribute on the template declaration should take precedence over the visibility of the types in the template parameter list, and then the explicit visibility attribute on the

[PATCH] D153835: [Sema] Clone VisibilityAttr for functions in template instantiations

2023-07-07 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a subscriber: erichkeane. MaskRay added a comment. In D153835#4481462 , @rjmccall wrote: > We made a decision ten years or so ago to use a slightly different > interpretation of the visibility attributes, so differences from GCC are not >

[PATCH] D153835: [Sema] Clone VisibilityAttr for functions in template instantiations

2023-07-07 Thread John McCall via Phabricator via cfe-commits
rjmccall requested changes to this revision. rjmccall added a comment. This revision now requires changes to proceed. We made a decision ten years or so ago to use a slightly different interpretation of the visibility attributes, so differences from GCC are not by themselves unexpected or

[PATCH] D153835: [Sema] Clone VisibilityAttr for functions in template instantiations

2023-07-06 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D153835#4478700 , @efriedma wrote: > Can you write the complete rule we're trying to follow here? Like, if you > have a free function template, prioritize attributes in the following order > ..., if you have a member

[PATCH] D153835: [Sema] Clone VisibilityAttr for functions in template instantiations

2023-07-06 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. Can you write the complete rule we're trying to follow here? Like, if you have a free function template, prioritize attributes in the following order ..., if you have a member function, use the following order ..., etc. I know that's a significant amount of writing,

[PATCH] D153835: [Sema] Clone VisibilityAttr for functions in template instantiations

2023-07-05 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Ping:) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153835/new/ https://reviews.llvm.org/D153835 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D153835: [Sema] Clone VisibilityAttr for functions in template instantiations

2023-06-26 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 534842. MaskRay edited the summary of this revision. MaskRay added a comment. remove a misleading comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153835/new/ https://reviews.llvm.org/D153835 Files:

[PATCH] D153835: [Sema] Clone VisibilityAttr for functions in template instantiations

2023-06-26 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: clang, aaron.ballman, efriedma, rjmccall, smeenai. Herald added a project: All. MaskRay requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fix