leonardchan added a comment. In https://reviews.llvm.org/D49511#1168692, @rsmith wrote:
> 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.) Done. I opted for not using `ExpressionEvaluationContextRecord` because I don't think I was using it correctly. A few other tests in sema failed when I tried pushing and popping from the stack holding these. I still process expressions as they are parsed though without using AST traversal on every expression. 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