[clang] [clang][Sema] Skip the RequiresExprBodyDecls for lambda dependencies (PR #83997)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 6 00:40:32 PST 2024
================
@@ -13649,10 +13649,29 @@ TreeTransform<Derived>::TransformLambdaExpr(LambdaExpr *E) {
// use evaluation contexts to distinguish the function parameter case.
CXXRecordDecl::LambdaDependencyKind DependencyKind =
CXXRecordDecl::LDK_Unknown;
+ DeclContext *DC = getSema().CurContext;
+ // A RequiresExprBodyDecl is not interesting for dependencies.
+ // For the following case,
+ //
+ // template <typename>
+ // concept C = requires { [] {}; };
+ //
+ // template <class F>
+ // struct Widget;
+ //
+ // template <C F>
+ // struct Widget<F> {};
+ //
+ // While we are here in substitution for Widget<F>, the parent of DC would be
----------------
cor3ntin wrote:
```suggestion
// While we are substituting Widget<F>, the parent of DC would be
```
https://github.com/llvm/llvm-project/pull/83997
More information about the cfe-commits
mailing list