[clang] [HLSL] Implement array temporary support (PR #79382)
    Eli Friedman via cfe-commits 
    cfe-commits at lists.llvm.org
       
    Fri Mar 29 10:45:26 PDT 2024
    
    
  
================
@@ -10926,6 +10965,10 @@ QualType ASTContext::mergeTypes(QualType LHS, QualType RHS, bool OfBlockPointer,
     assert(LHS != RHS &&
            "Equivalent pipe types should have already been handled!");
     return {};
+  case Type::ArrayParameter:
+    assert(LHS != RHS &&
+           "Equivalent pipe types should have already been handled!");
+    return LHS;
----------------
efriedma-quic wrote:
`return {};`?  Also, assertion text is wrong.
You could try to merge like we do for ConstantArray... but it's unlikely to matter, since HLSL is a C++ variant (and type merging is basically a C-only thing).
https://github.com/llvm/llvm-project/pull/79382
    
    
More information about the cfe-commits
mailing list