rtrieu marked an inline comment as done.
rtrieu added inline comments.

================
Comment at: test/Sema/warn-unreachable.c:437
+  if (~ 1)
     return; // CHECK-NOT: fix-it:"{{.*}}":{[[@LINE-1]]
   unaryOpNoFixit(); // expected-warning {{code will never be executed}}
----------------
jfb wrote:
> Why this change?
```
​  if (y == -1 && y != -1)  // condition from warn-unreachable.cpp
  if (- 1)  // condition here
```

The test case below in warn-unreachable.cpp all have silence notes on them.  
For consistency, I wanted the new case involving (y == -1 && y != -1) to also 
have a silence case.  The change to the reachability analysis to do that would 
also generate a silence note for (- 1).  Since (- 1) now generates a silence, I 
picked a different unary operator that would not.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D66044/new/

https://reviews.llvm.org/D66044



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

Reply via email to