danix800 added inline comments.
================ Comment at: clang/lib/AST/ASTImporter.cpp:3936-3937 + return std::move(Err); + if (ToInitializer) + ToField->setInClassInitializer(ToInitializer); return ToField; ---------------- Initializer could indirectly depends on this field and set the initializer while importing. `setInClassInitializer()` asserts that initializer should not be set more than once: ``` static int ref_A(); static int ref_B(); struct A { int a = ref_B(); }; struct B { int b = ref_A(); }; int ref_B() { B b; return b.b; } int ref_A() { A a; return a.a; } ``` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155574/new/ https://reviews.llvm.org/D155574 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits