Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[libc++] Audit all uses of _LIBCPP_ASSERT and _LIBCPP_DEBUG_ASSERT
I audited all uses of _LIBCPP_ASSERT to make sure that we only used it for "basic assertions", i.e. assertions with constant-time conditions. I also audited all uses of _LIBCPP_DEBUG_ASSERT to make sure we used it only for debug-mode assertions, and in one case had to change for _LIBCPP_ASSERT instead. As a fly-by, I also changed a couple of tests against nullptr or 0 to be more explicit. After this patch, all uses of _LIBCPP_ASSERT should be with constant-time conditions, and all uses of _LIBCPP_DEBUG_ASSERT should be with conditions that we only want to check when the debug mode is enabled. Differential Revision: https://reviews.llvm.org/D122395
- Loading branch information
Showing
5 changed files
with
43 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters