leonardchan added a comment. > Your current counter-based approach doesn't work very well in the case where > we switch to another context while processing an expression (for example, > during template instantiation): you'll defer all the diagnostics for the > inner construct until the outer construct is complete. Generally global > `Sema` state doesn't work very well for this reason.
Alternatively, I could move the set, counter, and logic using them into the `ExpressionEvaluationContextRecord`. Instead of tracking relative to a global Sema state, it would be relative to the latest record on the stack. Repository: rC Clang https://reviews.llvm.org/D49511 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits