danielmarjamaki added a comment.

LGTM! However I would like to see a review from somebody else also.

There are a number of diagnostics that might be affected. The 
Sema::DiagnoseAlwaysNonNullPointer diagnoses these:

diag::warn_this_null_compare
diag::warn_this_bool_conversion
diag::warn_address_of_reference_null_compare
diag::warn_address_of_reference_bool_conversion
diag::warn_nonnull_expr_compare
diag::warn_cast_nonnull_to_bool
diag::warn_null_pointer_compare   <-- I think this is the one bug 20951 is about
diag::warn_impcast_pointer_to_bool

It seems to me that it is an improvement for all these warnings to skip the 
parentheses. However there is a danger that parentheses should hide some 
warnings to make it possible for users to hide unwanted warnings. But if that 
was the design decision then some regression test should complain when we skip 
the parentheses.


Repository:
  rL LLVM

https://reviews.llvm.org/D38718



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

Reply via email to