[PATCH] D148802: [Sema] Lambdas are not part of immediate context for deduction

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 20 06:59:02 PDT 2023


ilya-biryukov created this revision.
ilya-biryukov added reviewers: aaron.ballman, erichkeane.
Herald added a project: All.
ilya-biryukov requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

This commit implements [temp.deduct]p9.
Test updates include:

- New notes in `cxx1y-init-captures.cpp`, `lambda-expressions.cpp` and 'warn-unused-lambda-capture.cpp'. This seems to be caused by diagnosing errors earlier (during deduction) that were previously surfaced later (during instantiation).
- New error `lambda-unevaluated.cpp` is in line with [temp.deduct]p9.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D148802

Files:
  clang/docs/ReleaseNotes.rst
  clang/include/clang/Sema/Sema.h
  clang/lib/Frontend/FrontendActions.cpp
  clang/lib/Sema/SemaTemplateInstantiate.cpp
  clang/test/CXX/temp/temp.deduct/p9.cpp
  clang/test/SemaCXX/cxx1y-init-captures.cpp
  clang/test/SemaCXX/lambda-expressions.cpp
  clang/test/SemaCXX/lambda-unevaluated.cpp
  clang/test/SemaCXX/warn-unused-lambda-capture.cpp
  clang/www/cxx_status.html

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D148802.515315.patch
Type: text/x-patch
Size: 11323 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230420/47a467e2/attachment.bin>


More information about the cfe-commits mailing list