summaryrefslogtreecommitdiff
path: root/libc/src/assert/assert.h
AgeCommit message (Collapse)Author
2024-10-27[libc] Add `__builtin_expect` tag on assert conditions; NFC (#99498)goldsteinn
2024-02-28[libc] remove header guard for assert.h (#83334)Nick Desaulniers
It's meant to be included multiple times! Maybe use a NOLINT rule to suppress clang-tidy's llvm-header-guard lint warning.
2024-02-28[libc] fix clang-tidy llvm-header-guard warnings (#82679)Nick Desaulniers
Towards the goal of getting `ninja libc-lint` back to green, fix the numerous instances of: warning: header guard does not follow preferred style [llvm-header-guard] This is because many of our header guards start with `__LLVM` rather than `LLVM`. To filter just these warnings: $ ninja -k2000 libc-lint 2>&1 | grep llvm-header-guard To automatically apply fixits: $ find libc/src libc/include libc/test -name \*.h | \ xargs -n1 -I {} clang-tidy {} -p build/compile_commands.json \ -checks='-*,llvm-header-guard' --fix --quiet Some manual cleanup is still necessary as headers that were missing header guards outright will have them inserted before the license block (we prefer them after).
2023-09-26[libc] Mass replace enclosing namespace (#67032)Guillaume Chatelet
This is step 4 of https://discourse.llvm.org/t/rfc-customizable-namespace-to-allow-testing-the-libc-when-the-system-libc-is-also-llvms-libc/73079
2023-04-10[libc][obvious] fix new assert typoMichael Jones
2023-04-07[libc][obvious] fix phrasing in assert commentMichael Jones
2020-11-03[LIBC][NFC] Rename errno and assert files to match other files with functionsMichael Jones
Rename the files containing the `__errno_location` function to `__errno_location.h/cpp` to match the other files and move the `llvmlibc_errno` macro to its own file. Split assert.h into `__assert_fail.h` (contains the function prototype) and assert.h (contains the assert macro). Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D90653
2020-04-08[libc][NFC] Make all top of file comments consistent.Paula Toth
Summary: Made all header files consistent based of this documentation: https://llvm.org/docs/CodingStandards.html#file-headers. And did the same for all source files top of file comments. Reviewers: sivachandra, abrachet Reviewed By: sivachandra, abrachet Subscribers: MaskRay, tschuett, libc-commits Tags: #libc-project Differential Revision: https://reviews.llvm.org/D77533
2020-03-11[libc] Add initial assert definitionAlex Brachet
Summary: This patch adds a temporary `__assert_fail` and `assert` definition to make it available to internal llvm libc code. `__assert_fail` writes to fd 2 directly instead of `stderr`, using SYS_write. I have not put it in its own linux directory because this is temporary and it should be using stdio's api in the future. It does not currently print out the line number (although we could do that by stringifying `__LINE__` if reviewers wish). Reviewers: sivachandra, gchatelet, PaulkaToast Reviewed By: sivachandra Subscribers: mgorny, MaskRay, tschuett, libc-commits Differential Revision: https://reviews.llvm.org/D75420