[PATCH] D27226: [MS ABI] Implement more of the Itanium mangling rules

Reid Kleckner via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 30 16:22:55 PST 2016


rnk added inline comments.


================
Comment at: lib/AST/MicrosoftMangle.cpp:838
+          if (Func)
+            LambdaId = Func->getNumParams() - Parm->getFunctionScopeIndex();
+          else if (LambdaManglingNumber)
----------------
Isn't this no good if I have two lambdas in one default arg?
  inline int f(int x = [] { return 1; }() + [] { return 2; }()) { return x; }
  int main() { return f(); }
We probably need <lambda_${argno}_${id}>. =/


https://reviews.llvm.org/D27226





More information about the cfe-commits mailing list