aaron.ballman added inline comments.
================ Comment at: clang/include/clang/Sema/Sema.h:1300-1301 + bool InDiscardedStatement : 1; + bool InImmediateFunctionContext : 1; + ---------------- No real benefit to making these bit-fields, and it'd be good to add some documentation about why the fields exist. ================ Comment at: clang/lib/Sema/SemaExpr.cpp:16571-16573 + // Discarded statements and immediate contexts nested in other + // Discarded statements or immediate context are themselves + // discarded statements or immediate context respectively. ---------------- ================ Comment at: clang/lib/Sema/SemaExpr.cpp:16575-16578 + ExprEvalContexts[ExprEvalContexts.size() - 2] + .isDiscardedStatementContext(); + ExprEvalContexts.back().InImmediateFunctionContext = + ExprEvalContexts[ExprEvalContexts.size() - 2] ---------------- It took me a moment to understand why `-2` was happening here. However, isn't this going to be UB when we go to push the first expr evaluation context? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113749/new/ https://reviews.llvm.org/D113749 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits