rsmith added inline comments.
================ Comment at: clang/lib/Sema/SemaLambda.cpp:1278 + if (CallOpCC == DefaultMember) + return DefaultFree; + return CallOpCC; ---------------- erichkeane wrote: > rjmccall wrote: > > ...I made this comment in my first review, but Phabricator threw it away. > > > > The attributes let you explicitly request the default method CC, right? I > > think you need to check for an explicit attribute rather than just checking > > CC identity. There should be an AttributedType in the sugar. > They do, but I can't seem to find a way to find them. The calling convention > is already merged into the functiontype by the time we get here, the > AttributedType isn't accessible. > > So it seems we don't distinguish between "modified by attribute", > "modified-default by command line", and "modified-default by TargetInfo." > > That said, I somewhat think this is the right thing to do anyway. If you're > on a platform where the default call convention is different between a > free-function and member-function, I'd think that this is what you MEAN... The `AttributedType` should be present in the type on the `TypeSourceInfo` for the call operator. It might not be present on the type retrieved by `getType()`, though. Concretely, what targets have different calling conventions for member versus non-member functions, and what do those calling conventions do differently? (For example, if the default member calling convention treats `this` differently, it doesn't seem reasonable to apply that to the static invoker...) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89559/new/ https://reviews.llvm.org/D89559 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits