[libc-commits] [PATCH] D75420: [libc] Add initial assert definition

Siva Chandra via Phabricator via libc-commits libc-commits at lists.llvm.org
Mon Mar 9 11:19:44 PDT 2020


sivachandra added inline comments.


================
Comment at: libc/include/assert.h.def:14
+
+%%public_api()
+
----------------
What do you think about moving `%%public_api` outside of the header guards?
Leave the `__assert_fail` definition within the header guards but define `static_assert` with an `undef` like:

```
    #ifndef __cplusplus
    #undef static_assert
    #define static_assert _Static_assert
    #endif
```

Then, we don't have to put the `assert` macro definition in the `.h.def` file?


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

https://reviews.llvm.org/D75420





More information about the libc-commits mailing list