ChuanqiXu added inline comments.
================ Comment at: clang/lib/CodeGen/CGCoroutine.cpp:158-169 + assert(Result && "Why can't we find the record type from the common " + "expression of a coroutine suspend expression? " + "Maybe we missed some types or the Sema get something " + "incorrect"); + + // In a release build without assertions enabled, return false directly + // to give users better user experience. It doesn't matter with the ---------------- Note that the may cause a crash if there are some types we are not able to covered. This is intentional. Since such crash is easy to fix by adding new type to the TypeVisitor. I guess this may be understandable since the type system of clang frontend (or should I say C++?) is really complex. Also note that this only matters with people who enabled assertions, possibly developers or testers. For end users who use a clean release build, it is completely OK to not match the type. They may only need to pay 1 bit memory overhead for that. I feel this is better for the user experience. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157833/new/ https://reviews.llvm.org/D157833 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits