llvm-capstone/clang/test/ParserHLSL
Chris B d462621694
[HLSL] Parameter modifier parsing and AST (#72139)
This change implements parsing for HLSL's parameter modifier keywords
`in`, `out` and `inout`. Because HLSL doesn't support references or
pointers, these keywords are used to allow parameters to be passed in
and out of functions.

This change only implements the parsing and AST support. In the HLSL
ASTs we represent `out` and `inout` parameters as references, and we
implement the semantics of by-value passing during IR generation.

In HLSL parameters marked `out` and `inout` are ambiguous in function
declarations, and `in`, `out` and `inout` may be ambiguous at call
sites.

This means a function may be defined as `fn(in T)` and `fn(inout T)` or
`fn(out T)`, but not `fn(inout T)` and `fn(out T)`. If a funciton `fn`
is declared with `in` and `inout` or `out` arguments, the call will be
ambiguous the same as a C++ call would be ambiguous given declarations
`fn(T)` and `fn(T&)`.

Fixes #59849
2023-11-28 15:03:10 -06:00
..
access_specifiers.hlsl
cb_error.hlsl
group_shared_202x.hlsl
group_shared.hlsl [clang] Enable C++11-style attributes in all language modes 2023-07-22 09:34:15 -07:00
hlsl_groupshared.cpp [HLSL] Parameter modifier parsing and AST (#72139) 2023-11-28 15:03:10 -06:00
hlsl_parameter_modifiers.cpp [HLSL] Parameter modifier parsing and AST (#72139) 2023-11-28 15:03:10 -06:00
invalid_inside_cb.hlsl
lit.local.cfg [NFC][Py Reformat] Reformat python files in clang and clang-tools-extra 2023-05-23 08:29:52 +02:00
semantic_parsing.hlsl