kimgr added a comment. This was eventually fixed in IWYU. I believe the problem is/was:
- After code is parsed and the AST is built, Sema resets its `TUScope` member to null - We use Sema to lookup and define default constructors before traversing the AST using a RAV - Some yet-not-fully-identified constructs cause Sema to need a TUScope for this (something to do with `LazilyCreateBuiltin`, but I haven't been able to construct a reduced testcase) So in https://github.com/include-what-you-use/include-what-you-use/commit/5e7843434169a8af333305ebd6e1434cc3cffb66, we explicitly re-point `Sema::TUScope` to `Sema::getCurScope()`, which seems to have fixed the crash. This revision can be closed. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D31697/new/ https://reviews.llvm.org/D31697 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits