-
Notifications
You must be signed in to change notification settings - Fork 13.5k
[clang++] Assertion `!E->isValueDependent()' failed in (anonymous namespace)::ArrayExprEvaluator::VisitCXXParenListOrInitListExpr #112140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@llvm/issue-subscribers-clang-frontend Author: Yihan Yang (yijan4845)
**This testcase is generated by a fuzzer.**
Compiler Explorer: https://godbolt.org/z/hTxx8nrcs This invalid code will crash on Clang Assertion Trunk. It seems that this goes back to clang-18: struct S {
constexpr S(const int &a = ) {}
};
void foo() {
constexpr S s[2] = {};
} There is a similar assertion fail in 111378. Stack dump:
|
I think CC @cor3ntin |
Hi! This issue may be a good introductory issue for people new to working on LLVM. If you would like to work on this issue, your first steps are:
If you have any further questions about this issue, don't hesitate to ask via a comment in the thread below. |
@llvm/issue-subscribers-good-first-issue Author: Yihan Yang (yijan4845)
**This testcase is generated by a fuzzer.**
Compiler Explorer: https://godbolt.org/z/hTxx8nrcs This invalid code will crash on Clang Assertion Trunk. It seems that this goes back to clang-18: struct S {
constexpr S(const int &a = ) {}
};
void foo() {
constexpr S s[2] = {};
} There is a similar assertion fail in 111378. Stack dump:
|
…essions (#112612) Fixes #112140 --- ``` CXXConstructExpr 0x14209e580 'const S':'const struct S' contains-errors 'void (const int &)' list `-CXXDefaultArgExpr 0x14209e500 'const int' contains-errors `-RecoveryExpr 0x14209daf0 'const int' contains-errors ``` This change resolves an issue with evaluating `ArrayFiller` initializers in _dependent_ contexts, especially when they involve a `RecoveryExpr`. In certain cases, `ArrayFiller` initializers containing a `RecoveryExpr` from earlier errors are incorrectly passed to `EvaluateInPlace`, causing evaluation failures when they are value-dependent. When this is the case, the initializer is processed through `EvaluateDependentExpr`, which prevents unnecessary evaluation attempts and ensures proper handling of value-dependent initializers in `ArrayFillers`.
…essions (llvm#112612) Fixes llvm#112140 --- ``` CXXConstructExpr 0x14209e580 'const S':'const struct S' contains-errors 'void (const int &)' list `-CXXDefaultArgExpr 0x14209e500 'const int' contains-errors `-RecoveryExpr 0x14209daf0 'const int' contains-errors ``` This change resolves an issue with evaluating `ArrayFiller` initializers in _dependent_ contexts, especially when they involve a `RecoveryExpr`. In certain cases, `ArrayFiller` initializers containing a `RecoveryExpr` from earlier errors are incorrectly passed to `EvaluateInPlace`, causing evaluation failures when they are value-dependent. When this is the case, the initializer is processed through `EvaluateDependentExpr`, which prevents unnecessary evaluation attempts and ensures proper handling of value-dependent initializers in `ArrayFillers`.
This testcase is generated by a fuzzer.
Compiler Explorer: https://godbolt.org/z/hTxx8nrcs
This invalid code will crash on Clang Assertion Trunk. It seems that this goes back to clang-18:
There is a similar assertion fail in 111378.
Stack dump:
The text was updated successfully, but these errors were encountered: