[PATCH] D67559: [Sema] Split of versions of -Wimplicit-{float,int}-conversion for Objective-C BOOL

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 17 11:21:14 PDT 2019


aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.

LGTM.



================
Comment at: clang/test/Sema/objc-bool-constant-conversion-fixit.m:37
+
+  b = 1 ? 2 : 3;
+  // CHECK: b = 1 ? 2 ? YES : NO : 3 ? YES : NO;
----------------
What about:
```
b = 1 ? (2 ? 3 : 4) : 5;
```
Will it YES/NO all the way down?


================
Comment at: clang/test/SemaObjC/signed-char-bool-conversion.m:48
+  bp.p = 1;
+  bp.p = 2; // expected-warning {{implicit conversion from constant value 2 to BOOL; the only well defined values for BOOL are YES and NO}}
+}
----------------
'BOOL', 'YES', and 'NO' at some point (doesn't have to be in this patch).


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

https://reviews.llvm.org/D67559





More information about the cfe-commits mailing list