[PATCH] D62435: Add Attribute NoThrow as an Exception Specifier Type

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat May 25 06:47:09 PDT 2019


erichkeane marked 2 inline comments as done.
erichkeane added inline comments.


================
Comment at: clang/include/clang-c/Index.h:202-204
+   * The cursor has a declspec(nothrow) exception specification.
+   */
+  CXCursor_ExceptionSpecificationKind_NoThrow,
----------------
rsmith wrote:
> This would renumber the later enumerators, resulting in an ABI break for our stable C ABI.
Is it alright to just add it to the end then? Or do I need to translate it into one of the others?


================
Comment at: clang/lib/Sema/SemaExprCXX.cpp:6067-6068
   if (EST2 == EST_NoexceptTrue) return ESI1;
+  if (EST1 == EST_NoThrow) return ESI2;
+  if (EST2 == EST_NoThrow) return ESI1;
 
----------------
rsmith wrote:
> I think this should be checked earlier, in the spirit of allowing "real" syntax to be preferred to attributes. (Eg, given a declaration that's `__declspec(nothrow)` and one that's `noexcept`, we should keep the `noexcept` in the merged type.)
Ah, right, good point.

Looking above, I'm torn between above or below MSAny. Do you have a thought?


Repository:
  rC Clang

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

https://reviews.llvm.org/D62435





More information about the cfe-commits mailing list