Sorry I don't understand. I have to add "final" onto BinaryOperator in order to use Trailing storage. But when I do that I can't derive CompoundAssignmentOperator from BinaryOperator. So I think I must fold these 2 classes together. Is there another way?
> -----Original Message----- > From: John McCall via Phabricator <revi...@reviews.llvm.org> > Sent: Wednesday, March 11, 2020 2:19 PM > To: Blower, Melanie I <melanie.blo...@intel.com>; Kaylor, Andrew > <andrew.kay...@intel.com>; kevin.n...@sas.com; rjmcc...@gmail.com; > sepavl...@gmail.com; ane...@apple.com; matthew.arsena...@amd.com; > syaghm...@apple.com > Cc: rekanikol...@gmail.com; wei.di...@amd.com; wuz...@cn.ibm.com; > lebedev...@gmail.com; nemanja.i....@gmail.com; > jv...@scarletmail.rutgers.edu; kit.bar...@gmail.com; Wang, Pengfei > <pengfei.w...@intel.com>; cfe-commits@lists.llvm.org; llvm- > comm...@lists.llvm.org; mlek...@skidmore.edu; blitzrak...@gmail.com; > shen...@google.com; t.p.northo...@gmail.com; paul.robin...@sony.com; > david.gr...@arm.com; t...@google.com; 1.in...@gmail.com > Subject: [PATCH] D72841: [RFC] Add support for pragma float_control, to > control precision and exception behavior at the source level > > rjmccall added a comment. > > In D72841#1917340 <https://reviews.llvm.org/D72841#1917340>, @mibintc > wrote: > > > @rjmccall Since CompoundAssignmentOperator derives from > BinaryOperator, it's not simple to add Trailing storage here. I think I will > have to > fold CompoundAssignmentOperator into BinaryOperator and then add the 2 > extra fields needed by CompoundAssignmentOperator into Trailing storage. Can > you think of a better way? I worked on Trailing storage for UnaryOperator > first > and that wasn't too bad, but Binary is a different story. > > > It's something we deal with occasionally, but it's definitely annoying. You > basically have to test for which concrete class you have and then ask that > class > for its trailing storage. > > Collapsing the types might be okay but could get involved. > > > Repository: > rG LLVM Github Monorepo > > CHANGES SINCE LAST ACTION > https://reviews.llvm.org/D72841/new/ > > https://reviews.llvm.org/D72841 > > _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits