[PATCH] D143919: [Clang] Copy strictfp attribute from pattern to instantiation

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 13 12:20:12 PST 2023


rjmccall added a comment.

In D143919#4123712 <https://reviews.llvm.org/D143919#4123712>, @sepavloff wrote:

> In D143919#4123616 <https://reviews.llvm.org/D143919#4123616>, @efriedma wrote:
>
>> We have code somewhere to generically copy attributes from function templates to instantiations, right?  Why do we need to explicitly copy StrictFPAttr in particular, separate from that?
>
> Could you please point me out to this code? I didn't find it.

It's the call to `InstantiateAttrs` in `InitFunctionInstantiation`.  `InstantiateAttrs` hard-codes a list of attributes to clone, which seems like a bad design, but it's easy enough to imitate in your code.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D143919/new/

https://reviews.llvm.org/D143919



More information about the cfe-commits mailing list