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. (original) (raw)

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.