_Generic accepts an expression operand whose type is matched against a list of associations. The expression operand is unevaluated, but the type matched is the type after lvalue conversion. This conversion loses type information, which makes it more difficult to match against qualified or incomplete types. This extension allows _Generic to accept a type operand instead of an expression operand. The type operand form does not undergo any conversions and is matched directly against the association list. This extension is also supported in C++ as we already supported _Generic selection expressions there. The RFC for this extension can be found at: https://discourse.llvm.org/t/rfc-generic-selection-expression-with-a-type-operand/70388 Differential Revision: https://reviews.llvm.org/D149904
28 KiB
28 KiB