rjmccall added a comment.

Okay, this seems fine to me.  I think you accidentally removed the word 
"promotion" from the patch title, though.

I assume HLSL also provides `uint16_t`, and you should test the behavior for 
it.  You should also test this for whatever 8-bit types HLSL provides (`char`, 
`signed char`, and `unsigned char`, I assume, but maybe also `int8_t` and 
`uint8_t`?).



================
Comment at: clang/lib/Sema/SemaExpr.cpp:841
+    if (Ty->isPromotableIntegerType() &&
+        // Avoid promote integer type to int.
+        !getLangOpts().HLSL) {
----------------



================
Comment at: clang/test/CodeGenHLSL/basic_types.hlsl:7
 // CHECK:"?uint16_t_Val@@3GA" = global i16 0, align 2
-// CHECK:"?int16_t_Val@@3FA" = global i16 0, align 2
+// CHECK:"?int16_t_Val@@3FA" = global i16 0
 // CHECK:"?uint_Val@@3IA" = global i32 0, align 4
----------------
Why the removal of the alignment?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D133668

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

Reply via email to