[PATCH] D28231: -Wunreachable-code: Avoid multiple diagnostics that are triggered by the same source range and fix the unary operator fixit source range

Akira Hatanaka via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 3 12:28:56 PST 2017


ahatanak added a comment.

If I change the condition to the following,

  if (!s->p || 1)

clang suggests enclosing !s->p with a parenthesis, but the comment in ReachableCode.cpp says the parenthesis should enclose the integer literal. It seems like there is a contradiction here?


Repository:
  rL LLVM

https://reviews.llvm.org/D28231





More information about the cfe-commits mailing list