55// This file is distributed under the University of Illinois Open Source
66// License. See LICENSE.TXT for details.
77//
8+ // Modifications Copyright(C) 2025 Advanced Micro Devices, Inc.
9+ // All rights reserved.
10+ //
811// ===----------------------------------------------------------------------===//
912//
1013// This file enumerates the different kinds of operations that can be
1821#include < limits> // HLSL Change
1922
2023namespace clang {
21-
24+
2225// / CastKind - The kind of operation required for a conversion.
2326enum CastKind {
2427 // / CK_Dependent - A conversion which cannot yet be analyzed because
@@ -321,6 +324,8 @@ enum CastKind {
321324 CK_HLSLCC_FloatingToIntegral,
322325 CK_HLSLCC_FloatingToBoolean,
323326 CK_HLSLCC_FloatingCast,
327+ CK_VK_BufferPointerToIntegral,
328+ CK_VK_IntegralToBufferPointer,
324329
325330 // HLSL Change - Made CK_Invalid an enum case because otherwise it is UB to
326331 // assign it to a value of CastKind.
@@ -335,35 +340,55 @@ static_assert(
335340enum BinaryOperatorKind {
336341 // Operators listed in order of precedence.
337342 // Note that additions to this should also update the StmtVisitor class.
338- BO_PtrMemD, BO_PtrMemI, // [C++ 5.5] Pointer-to-member operators.
339- BO_Mul, BO_Div, BO_Rem, // [C99 6.5.5] Multiplicative operators.
340- BO_Add, BO_Sub, // [C99 6.5.6] Additive operators.
341- BO_Shl, BO_Shr, // [C99 6.5.7] Bitwise shift operators.
342- BO_LT, BO_GT, BO_LE, BO_GE, // [C99 6.5.8] Relational operators.
343- BO_EQ, BO_NE, // [C99 6.5.9] Equality operators.
344- BO_And, // [C99 6.5.10] Bitwise AND operator.
345- BO_Xor, // [C99 6.5.11] Bitwise XOR operator.
346- BO_Or, // [C99 6.5.12] Bitwise OR operator.
347- BO_LAnd, // [C99 6.5.13] Logical AND operator.
348- BO_LOr, // [C99 6.5.14] Logical OR operator.
349- BO_Assign, BO_MulAssign, // [C99 6.5.16] Assignment operators.
350- BO_DivAssign, BO_RemAssign,
351- BO_AddAssign, BO_SubAssign,
352- BO_ShlAssign, BO_ShrAssign,
353- BO_AndAssign, BO_XorAssign,
343+ BO_PtrMemD,
344+ BO_PtrMemI, // [C++ 5.5] Pointer-to-member operators.
345+ BO_Mul,
346+ BO_Div,
347+ BO_Rem, // [C99 6.5.5] Multiplicative operators.
348+ BO_Add,
349+ BO_Sub, // [C99 6.5.6] Additive operators.
350+ BO_Shl,
351+ BO_Shr, // [C99 6.5.7] Bitwise shift operators.
352+ BO_LT,
353+ BO_GT,
354+ BO_LE,
355+ BO_GE, // [C99 6.5.8] Relational operators.
356+ BO_EQ,
357+ BO_NE, // [C99 6.5.9] Equality operators.
358+ BO_And, // [C99 6.5.10] Bitwise AND operator.
359+ BO_Xor, // [C99 6.5.11] Bitwise XOR operator.
360+ BO_Or, // [C99 6.5.12] Bitwise OR operator.
361+ BO_LAnd, // [C99 6.5.13] Logical AND operator.
362+ BO_LOr, // [C99 6.5.14] Logical OR operator.
363+ BO_Assign,
364+ BO_MulAssign, // [C99 6.5.16] Assignment operators.
365+ BO_DivAssign,
366+ BO_RemAssign,
367+ BO_AddAssign,
368+ BO_SubAssign,
369+ BO_ShlAssign,
370+ BO_ShrAssign,
371+ BO_AndAssign,
372+ BO_XorAssign,
354373 BO_OrAssign,
355- BO_Comma // [C99 6.5.17] Comma operator.
374+ BO_Comma // [C99 6.5.17] Comma operator.
356375};
357376
358377enum UnaryOperatorKind {
359378 // Note that additions to this should also update the StmtVisitor class.
360- UO_PostInc, UO_PostDec, // [C99 6.5.2.4] Postfix increment and decrement
361- UO_PreInc, UO_PreDec, // [C99 6.5.3.1] Prefix increment and decrement
362- UO_AddrOf, UO_Deref, // [C99 6.5.3.2] Address and indirection
363- UO_Plus, UO_Minus, // [C99 6.5.3.3] Unary arithmetic
364- UO_Not, UO_LNot, // [C99 6.5.3.3] Unary arithmetic
365- UO_Real, UO_Imag, // "__real expr"/"__imag expr" Extension.
366- UO_Extension // __extension__ marker.
379+ UO_PostInc,
380+ UO_PostDec, // [C99 6.5.2.4] Postfix increment and decrement
381+ UO_PreInc,
382+ UO_PreDec, // [C99 6.5.3.1] Prefix increment and decrement
383+ UO_AddrOf,
384+ UO_Deref, // [C99 6.5.3.2] Address and indirection
385+ UO_Plus,
386+ UO_Minus, // [C99 6.5.3.3] Unary arithmetic
387+ UO_Not,
388+ UO_LNot, // [C99 6.5.3.3] Unary arithmetic
389+ UO_Real,
390+ UO_Imag, // "__real expr"/"__imag expr" Extension.
391+ UO_Extension // __extension__ marker.
367392};
368393
369394// / \brief The kind of bridging performed by the Objective-C bridge cast.
@@ -379,6 +404,6 @@ enum ObjCBridgeCastKind {
379404 OBC_BridgeRetained
380405};
381406
382- }
407+ } // namespace clang
383408
384409#endif
0 commit comments