[PATCH] D55039: [sema] Warn of mangling change if function parameters are noexcept.

Matt Davis via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 29 15:07:48 PST 2018


mattd marked an inline comment as done.
mattd added a comment.

Thanks for the reviews and added example.  I'll update the logic to account for the return type, and add @Rakete1111 's example to the existing test.



================
Comment at: lib/Sema/SemaDecl.cpp:10225
+              llvm::any_of(FPT->param_types(),
+                           [&](QualType Q) { return HasNoexcept(Q); }))
             return true;
----------------
erik.pilkington wrote:
> Can you just make this lambda a static function? Recursive lambdas are a bit crazy :)
Not a problem!  Actually, in my original fix I was hacking on,  I moved the lambda into its own static function.  But after looking at the patch, the least invasive thing, to keep the patch as small as possible, was just to make the lambda recursive... and part of me really liked the idea of a recursive lambda.  I'm working on an update, and will move the lambda to a static function.


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

https://reviews.llvm.org/D55039





More information about the cfe-commits mailing list