[PATCH] D49511: [Sema/Attribute] Check for noderef attribute

Leonard Chan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 31 16:20:07 PDT 2018


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





More information about the cfe-commits mailing list