[clang] [HLSL] Add NativeInt16Type langopt to control whether short type is supported. Enabled by default for all but HLSL. (PR #165584)

Finn Plummer via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 29 09:24:34 PDT 2025


================
@@ -4248,6 +4248,13 @@ void Parser::ParseDeclarationSpecifiers(
 
     // type-specifier
     case tok::kw_short:
+      if (!getLangOpts().NativeInt16Type) {
----------------
inbelic wrote:

Is this change required? The parsing of `half` below (line 4319) doesn't require this to emit errors when it isn't supported. And IIRC, I didn't need this change to generate errors that the int 16 type was not supported when I was poking around

https://github.com/llvm/llvm-project/pull/165584


More information about the cfe-commits mailing list