[all-commits] [llvm/llvm-project] 69dd89: [Clang] Fix references to captured variables in de...
cor3ntin via All-commits
all-commits at lists.llvm.org
Wed Apr 20 06:35:35 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 69dd89fdcbd846375a45e2fe3a88710887236d7a
https://github.com/llvm/llvm-project/commit/69dd89fdcbd846375a45e2fe3a88710887236d7a
Author: Corentin Jabot <corentinjabot at gmail.com>
Date: 2022-04-20 (Wed, 20 Apr 2022)
Changed paths:
M clang/include/clang/Sema/Sema.h
M clang/lib/Sema/SemaLambda.cpp
M clang/lib/Sema/TreeTransform.h
M clang/test/CXX/expr/expr.prim/expr.prim.lambda/p4.cpp
M clang/test/SemaCXX/lambda-capture-type-deduction.cpp
Log Message:
-----------
[Clang] Fix references to captured variables in dependant context.
D119136 changed how captures are handled in a lambda call operator
declaration, but did not properly handled dependant context,
which led to crash when refering to init-captures in
a trailing return type.
We fix that bug by making transformations more symetric with parsing,
ie. we first create the call operator, then transform the capture,
then compute the type of the lambda call operaror.
This ensures captures exist and have the right type when
we parse a trailing requires-clause / return type.
Reviewed By: aaron.ballman
Differential Revision: https://reviews.llvm.org/D124012
More information about the All-commits
mailing list