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



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

Reply via email to