aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/LoopUtils.cpp
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2025-03-27 13:23:16 -0400
committerGitHub <noreply@github.com>2025-03-27 13:23:16 -0400
commit00c43ae23524d72707701620da89ad248393a8e4 (patch)
treedb75f9b0f46c6c1a486889618225a6831580cad7 /llvm/lib/Transforms/Utils/LoopUtils.cpp
parent08bb0b86dc8d8047fc5ef3180ae6388605c4d0c6 (diff)
downloadllvm-00c43ae23524d72707701620da89ad248393a8e4.zip
llvm-00c43ae23524d72707701620da89ad248393a8e4.tar.gz
llvm-00c43ae23524d72707701620da89ad248393a8e4.tar.bz2
[C2y] Implement WG14 N3369 and N3469 (_Countof) (#133125)
C2y adds the `_Countof` operator which returns the number of elements in an array. As with `sizeof`, `_Countof` either accepts a parenthesized type name or an expression. Its operand must be (of) an array type. When passed a constant-size array operand, the operator is a constant expression which is valid for use as an integer constant expression. This is being exposed as an extension in earlier C language modes, but not in C++. C++ already has `std::extent` and `std::size` to cover these needs, so the operator doesn't seem to get the user enough benefit to warrant carrying this as an extension. Fixes #102836
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopUtils.cpp')
0 files changed, 0 insertions, 0 deletions