[PATCH] D96175: [clang] Add support for attribute 'swift_async_error'

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 8 06:19:42 PST 2021


aaron.ballman added inline comments.


================
Comment at: clang/lib/Sema/SemaDeclAttr.cpp:5867
+          << AsyncAttr << isa<ObjCMethodDecl>(D);
+      return;
+    }
----------------
You can elide this `return`.


================
Comment at: clang/lib/Sema/SemaDeclAttr.cpp:5977
+    checkSwiftAsyncErrorBlock(S, D, ErrorAttr, AsyncAttr);
+}
+
----------------
Should there be a diagnostic to combine `swift_error` and `swift_async_error` on the same function? Similarly, should there be a diagnostic when adding `swift_async_error` to a function that isn't (eventually) marked `swift_async`?


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

https://reviews.llvm.org/D96175



More information about the cfe-commits mailing list