[PATCH] D95487: Itanium Mangling: Fix handling of <expr-primary> in <template-arg>.

Richard Smith - zygoloid via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 27 13:07:47 PST 2021


rsmith accepted this revision.
rsmith added inline comments.


================
Comment at: clang/lib/AST/ItaniumMangle.cpp:549
   void mangleInitListElements(const InitListExpr *InitList);
-  void mangleDeclRefExpr(const NamedDecl *D);
-  void mangleExpression(const Expr *E, unsigned Arity = UnknownArity);
+  void mangleExpression(const Expr *E, unsigned Arity = UnknownArity, bool AsTemplateArg = false);
   void mangleCXXCtorType(CXXCtorType T, const CXXRecordDecl *InheritedFrom);
----------------
Looks like this is more than 80 columns.


================
Comment at: clang/lib/AST/ItaniumMangle.cpp:5145
+  ASTContext &Ctx = Context.getASTContext();
+  if (Ctx.getLangOpts().getClangABICompat() > LangOptions::ClangABI::Ver11) {
+    mangleExpression(E, UnknownArity, /*AsTemplateArg=*/true);
----------------
Given that we've now branched for the Clang 12 release, please make sure you either backport this to the Clang 12 release branch or bump this to `> Ver12`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D95487



More information about the cfe-commits mailing list