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



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to