[PATCH] D89559: PR47372: Fix Lambda invoker calling conventions

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 16 09:13:15 PDT 2020


erichkeane created this revision.
erichkeane added reviewers: rsmith, rjmccall.
erichkeane requested review of this revision.

As mentioned in the defect, the lambda static invoker does not follow
the calling convention of the lambda itself, which seems wrong. This
patch ensures that the calling convention of operator() is passed onto
the invoker and conversion-operator type.

This is accomplished by extracting the calling-convention determination
code out into a separate function in order to better reflect the 'thiscall'
work, as well as somewhat better support the future implementation of 
https://devblogs.microsoft.com/oldnewthing/20150220-00/?p=44623


Repository:
  rC Clang

https://reviews.llvm.org/D89559

Files:
  clang/lib/Sema/SemaLambda.cpp
  clang/test/SemaCXX/lambda-conversion-op-cc.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D89559.298646.patch
Type: text/x-patch
Size: 7659 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20201016/a22d51eb/attachment-0001.bin>


More information about the cfe-commits mailing list