alexfh wrote:
The internal code was fixed. Thanks everyone for helping to figure this out!
https://github.com/llvm/llvm-project/pull/83997
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
alexfh wrote:
It turns out debug build of clang before this patch generated an assertion on
the original code as well:
```
assert.h assertion failed at llvm-project/clang/lib/AST/ExprConstant.cpp:15739
in bool clang::Expr::EvaluateAsConstantExpr(EvalResult &, const ASTContext &,
alexfh wrote:
I guess the reduction could have dropped some important parts of this. Let me
try the original code with assertions-enabled clang build...
https://github.com/llvm/llvm-project/pull/83997
___
cfe-commits mailing list
zyn0217 wrote:
> I have a reduced test case, which is accepted by clang 18, but fails with
> this patch: https://gcc.godbolt.org/z/zMbKvsf7K
> A bit more compact one: https://gcc.godbolt.org/z/4rzYPKaze
Your case is rejected by all mainstream compilers as of now:
dwblaikie wrote:
FWIW, @jyknight's example fails to compile with GCC - succeeds with clang 18
release but assert-fails with clang 18 +Asserts build. (not sure about the
original/full internal reproduction - we have a way to run compile with
assertions enaled, but I'm not sure I'm holding it
jyknight wrote:
Can reduce further to:
```
template
concept h = requires(T i) { [] {}(i); };
template struct k;
template struct k {
struct n;
};
using o = k::n;
```
But, is `requires(T i) { [] {}(i); };` actually valid? I think that _should_
fail the requirement, since you cannot call
alexfh wrote:
A bit more compact one: https://gcc.godbolt.org/z/4rzYPKaze
https://github.com/llvm/llvm-project/pull/83997
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
alexfh wrote:
I have a reduced test case, which is accepted by clang 18, but fails with this
patch: https://gcc.godbolt.org/z/zMbKvsf7K
https://github.com/llvm/llvm-project/pull/83997
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
zyn0217 wrote:
> I'm reducing the test case. In the meantime, should this be reverted?
I think this depends on the case. Note the issues addressed by this patch may
not only cause some crashes in debug build, but probably lead to incorrect
constraint evaluation in release build, which means
alexfh wrote:
I'm reducing the test case. In the meantime, should this be reverted?
https://github.com/llvm/llvm-project/pull/83997
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
zyn0217 wrote:
> Was this sort of a behavior change expected?
I don't think so; a reproducer would be really appreciated.
https://github.com/llvm/llvm-project/pull/83997
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
alexfh wrote:
Hi folks, we've started seeing "implicit instantiation of undefined template"
compilation errors after this commit. In all cases code used to compile fine
before this commit. I haven't spotted any particular issues in the code (though
the examples are looked at are rather
https://github.com/zyn0217 closed
https://github.com/llvm/llvm-project/pull/83997
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/83997
>From 69414d7352b170f6fcff22c6f5dfa91cc76b0b58 Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Tue, 5 Mar 2024 19:56:59 +0800
Subject: [PATCH 1/3] gh56556
---
clang/lib/Sema/TreeTransform.h | 6 --
1
https://github.com/yuxuanchen1997 approved this pull request.
Thank you so much! This looks good.
https://github.com/llvm/llvm-project/pull/83997
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://github.com/cor3ntin approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/83997
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
zyn0217 wrote:
@cor3ntin Thanks! I have updated the test to reflect the nested `requires`
cases. PTAL?
https://github.com/llvm/llvm-project/pull/83997
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
@@ -13649,10 +13649,29 @@
TreeTransform::TransformLambdaExpr(LambdaExpr *E) {
// use evaluation contexts to distinguish the function parameter case.
CXXRecordDecl::LambdaDependencyKind DependencyKind =
CXXRecordDecl::LDK_Unknown;
+ DeclContext *DC =
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/83997
>From 69414d7352b170f6fcff22c6f5dfa91cc76b0b58 Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Tue, 5 Mar 2024 19:56:59 +0800
Subject: [PATCH 1/3] gh56556
---
clang/lib/Sema/TreeTransform.h | 6 --
1
@@ -13649,10 +13649,29 @@
TreeTransform::TransformLambdaExpr(LambdaExpr *E) {
// use evaluation contexts to distinguish the function parameter case.
CXXRecordDecl::LambdaDependencyKind DependencyKind =
CXXRecordDecl::LDK_Unknown;
+ DeclContext *DC =
@@ -13649,10 +13649,29 @@
TreeTransform::TransformLambdaExpr(LambdaExpr *E) {
// use evaluation contexts to distinguish the function parameter case.
CXXRecordDecl::LambdaDependencyKind DependencyKind =
CXXRecordDecl::LDK_Unknown;
+ DeclContext *DC =
@@ -13649,10 +13649,29 @@
TreeTransform::TransformLambdaExpr(LambdaExpr *E) {
// use evaluation contexts to distinguish the function parameter case.
CXXRecordDecl::LambdaDependencyKind DependencyKind =
CXXRecordDecl::LDK_Unknown;
+ DeclContext *DC =
https://github.com/zyn0217 edited
https://github.com/llvm/llvm-project/pull/83997
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/zyn0217 edited
https://github.com/llvm/llvm-project/pull/83997
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Younan Zhang (zyn0217)
Changes
The dependency of a lambda inside of a `RequiresExprBodyDecl` was previously
affected by its parent, e.g., `ClassTemplateSpecializationDecl`. This made the
lambda always dependent regardless of the template
https://github.com/zyn0217 ready_for_review
https://github.com/llvm/llvm-project/pull/83997
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/83997
>From 69414d7352b170f6fcff22c6f5dfa91cc76b0b58 Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Tue, 5 Mar 2024 19:56:59 +0800
Subject: [PATCH 1/2] gh56556
---
clang/lib/Sema/TreeTransform.h | 6 --
1
https://github.com/zyn0217 edited
https://github.com/llvm/llvm-project/pull/83997
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
28 matches
Mail list logo