[clang] [HLSL] Implement array temporary support (PR #79382)

Chris B via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 13 12:27:08 PDT 2024


================
@@ -3173,41 +3174,46 @@ class ArrayType : public Type, public llvm::FoldingSetNode {
     return T->getTypeClass() == ConstantArray ||
            T->getTypeClass() == VariableArray ||
            T->getTypeClass() == IncompleteArray ||
-           T->getTypeClass() == DependentSizedArray;
+           T->getTypeClass() == DependentSizedArray ||
+           T->getTypeClass() == ArrayParameter;
   }
 };
 
 /// Represents the canonical version of C arrays with a specified constant size.
 /// For example, the canonical type for 'int A[4 + 4*100]' is a
 /// ConstantArrayType where the element type is 'int' and the size is 404.
-class ConstantArrayType final
-    : public ArrayType,
-      private llvm::TrailingObjects<ConstantArrayType, const Expr *> {
----------------
llvm-beanz wrote:

My team is trying to be pedantic about tracking our work, so I've filed #85124 to track implementing @zygoloid's suggestion. I'll try and get a PR up for that in the next day or two then update this PR on top of that change.

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


More information about the cfe-commits mailing list