rjmccall added a reviewer: fhahn.
rjmccall added inline comments.

================
Comment at: clang/lib/AST/ItaniumMangle.cpp:4032
+      }
     }
     break;
----------------
The old case doesn't seem to be adding the `u8__uuidof` prefix anymore.

Your patch description does not say anything about changing the mangling of 
`__uuidof`, and that should be treated separately, not just lumped in to try to 
make manglings more consistent.


================
Comment at: clang/lib/AST/ItaniumMangle.cpp:4356
+          mangleExpression(SAE->getArgumentExpr());
+          Out << 'E';
+        }
----------------
This isn't a correct mangling of `template-arg` for expressions; simple 
expressions should not be surrounded by `X`...`E`.  Please call 
`mangleTemplateArg`.

Although... `mangleTemplateArg` doesn't look like it consistently does the 
right thing when you pass it a `TemplateArgument` constructed with an arbitrary 
expression, because it seems to be relying on certain expressions having been 
folded to their canonical representations during template argument checking.  
So really we need to have some code that mangles an expression as if it were a 
template argument, which is to say, recognizing simple expressions that fit 
into `expr-primary`.

This would break ABI for any existing place that calls `mangleTemplateArg` with 
an arbitrary expression, but it looks like the only place that does that is 
dependent matrix types, where I think wee can justify the break as a bug fix 
since matrix types are such a new feature.  Pinging Florian.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D93922/new/

https://reviews.llvm.org/D93922

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to