[PATCH] D62435: Add Attribute NoThrow as an Exception Specifier Type
Erich Keane via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon May 27 09:50:09 PDT 2019
erichkeane marked an inline comment as done.
erichkeane added inline comments.
Comment at: clang/lib/Sema/SemaType.cpp:6970
+ if (Proto->hasExceptionSpec())
+ return true;
> I think we should diagnose that the `nothrow` is ignored in this case to let users know they've done something in conflict and what wins.
I've been considering that over the weekend, and agree it is a good idea. I am on the fence about the when however. For example, should we warn with throw() or noexcept or noexcept(true)? In these cases, ignoring the attribute is the same as enforcing it.
My concern is that noexcept (expression-evaluating-to-true) gets ignored with a diagnostic, but has the same effect.
Did you have an opinion here?
CHANGES SINCE LAST ACTION
More information about the cfe-commits