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

Richard Smith - zygoloid via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 19 13:18:07 PDT 2018


rsmith added a comment.

The way in which you're checking for the problematic cases is unnecessarily expensive. Instead of performing a separate AST traversal, please detect whether you should be producing the warning directly when forming the problematic expressions. (For example, you could store a list of pending "dereference of noderef" expressions in the `ExpressionEvaluationContextRecord`, remove items from the list if you find they're the operand of a unary address-of operator, and diagnose any remaining items once you've left the evaluation context.)


Repository:
  rC Clang

https://reviews.llvm.org/D49511





More information about the cfe-commits mailing list