ogoffart added a comment. Looks like changing CurCodeDecl was not a good idea. Fixed in https://reviews.llvm.org/D102027 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97687/new/ https://reviews.llvm.org/D97687