Skip to content

clang: /root/llvm-project/clang/lib/AST/Expr.cpp:3289: bool clang::Expr::isConstantInitializer(clang::ASTContext&, bool, const clang::Expr**) const: Assertion `!isValueDependent() && "Expression evaluator can't be called on a dependent expression."' failed. #88008

Closed
@danix800

Description

@danix800

Clang trunk assertion failed on the following invalid initializer:

struct S {
	int v;
};

struct T;

void test(struct T *t)
{
	struct S s = { .v = t->y }; // t->y is invalid
}

https://godbolt.org/z/GnT41GbT5

Possibly similar to https://reviews.llvm.org/D84145.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions