================
@@ -5703,6 +5709,12 @@ void CXXNameMangler::mangleExpression(const Expr *E, 
unsigned Arity,
     Out << "E";
     break;
   }
+  case Expr::HLSLOutArgExprClass: {
+    const auto *OAE = cast<clang::HLSLOutArgExpr>(E);
+    Out << (OAE->isInOut() ? "_inout_" : "_out_");
+    mangleType(E->getType());
+    break;
+  }
----------------
rjmccall wrote:

Okay, so this is wrong in every way. :)

Expression mangling generally follows the syntax.  Since there is no 
argument-side syntax for passing an argument to an `out` or `inout` parameter, 
I'd say the correct mangling is just to ignore this node and mangle the 
underlying (syntactic) argument expression, which I assume is fairly easy to 
find (is that the base expression? whatever doesn't have the OVE still in it).

If it *were* important to mangle this for some reason, you would want to mangle 
it as a vendor extended expression, `u <source-name> <template-arg>* E`.

https://github.com/llvm/llvm-project/pull/101083
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to