PiotrZSL wrote:

The thing with OO_New and other was that when i merged code and extracted 
areParensNeededForStatement simple because I know that it will be needed for 
other checks I based it more on 
https://en.cppreference.com/w/cpp/language/operator_precedence. But there many 
operators are in same group, and information that is +- missing is an new 
parent operator. In future maybe areParensNeededForStatement will be extended 
to cover both old and new parent operator and provide more accurate hints. To 
avoid potential issues I put those OO_New and other on list that they need (), 
simply because that don't cause any problems, and to be honest there are not 
many use-cases and most of them are invalid anyway from a user perspective 
(like implicit casting of newly allocated memory to bool).

https://github.com/llvm/llvm-project/pull/74891
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to