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

Erik Pilkington via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 29 14:00:35 PST 2018


erik.pilkington added a comment.

It seems like this check isn't really doing enough to catch this break in full generality. For instance, the mangling of the following changes from C++14 to 17, but isn't diagnosed here:

  template <class T> struct something {};
  void f(something<void (*)() noexcept>) {}

The right thing to do is probably to use a more beefy traversal here, so I guess this is a step in the right direction.



================
Comment at: lib/Sema/SemaDecl.cpp:10225
+              llvm::any_of(FPT->param_types(),
+                           [&](QualType Q) { return HasNoexcept(Q); }))
             return true;
----------------
Can you just make this lambda a static function? Recursive lambdas are a bit crazy :)


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

https://reviews.llvm.org/D55039





More information about the cfe-commits mailing list