[PATCH] D105997: Implement _ExtInt conversion rules

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 14 09:43:13 PDT 2021


aaron.ballman added inline comments.


================
Comment at: clang/test/Sema/ext-int.c:7
              _ExtInt(32) s32, int b) {
-  b ? s30 : s31a; // expected-error{{incompatible operand types}}
-  b ? s31a : s30; // expected-error{{incompatible operand types}}
-  b ? s32 : 0; // expected-error{{incompatible operand types}}
+  b ? s30 : s31a;
+  b ? s31a : s30;
----------------
erichkeane wrote:
> Wouldn't mind some type-checking tests here if possible.  Or at least SOMEWHERE to make sure this produces the correct types, something with a static-assert would be great!
There's not a super easy way to do `is_same` in C, but I could add some AST dumping tests that involve `__typeof__` if that'd work for you?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D105997



More information about the cfe-commits mailing list