[all-commits] [llvm/llvm-project] 7949ee: [libc++] Introduce __is_pointer_in_range
philnik777 via All-commits
all-commits at lists.llvm.org
Wed Jun 7 13:34:12 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 7949ee0d4f10f4fa3b3021fb6269e14175c3b0ae
https://github.com/llvm/llvm-project/commit/7949ee0d4f10f4fa3b3021fb6269e14175c3b0ae
Author: Nikolas Klauser <nikolasklauser at berlin.de>
Date: 2023-06-07 (Wed, 07 Jun 2023)
Changed paths:
M libcxx/.clang-format
M libcxx/include/CMakeLists.txt
M libcxx/include/__config
A libcxx/include/__utility/is_pointer_in_range.h
M libcxx/include/module.modulemap.in
M libcxx/include/string
A libcxx/test/libcxx/utilities/is_pointer_in_range.pass.cpp
Log Message:
-----------
[libc++] Introduce __is_pointer_in_range
This checks whether a pointer is within a range, even during constant evaluation. This allows running optimized code paths during constant evaluation, instead of falling back to the general-purpose implementation all the time. This is also a central place for comparing unrelated pointers, which is technically UB.
Reviewed By: ldionne, #libc
Spies: libcxx-commits
Differential Revision: https://reviews.llvm.org/D143327
More information about the All-commits
mailing list