aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Flanders <mkf727@cs.washington.edu>2024-03-09 22:46:39 -0800
committerGitHub <noreply@github.com>2024-03-10 01:46:39 -0500
commit35b784379e707423f3b4f5a2cfedabcfa6f5b47d (patch)
tree7615b9bbb775c15e6e5afca27d4be7b3b34087d3
parentd2353ae00c3b0b0e9a9b93578e9bb067f699f193 (diff)
downloadllvm-35b784379e707423f3b4f5a2cfedabcfa6f5b47d.zip
llvm-35b784379e707423f3b4f5a2cfedabcfa6f5b47d.tar.gz
llvm-35b784379e707423f3b4f5a2cfedabcfa6f5b47d.tar.bz2
[libc][stdbit][c23] fixes typos in bit_width, bit_floor C type-generic macros (#84659)
Fixes #84658. Assuming these were typos in the first place. I am unsure of the best way to ensure that both sides of the preprocessor condition in `libc/include/llvm-libc-macros/stdbit-macros.h` are tested. Could someone point me in the right direction for adding test coverage to the non `__cplusplus` branch? Or maybe it is being tested and I've missed it.
-rw-r--r--libc/include/llvm-libc-macros/stdbit-macros.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/libc/include/llvm-libc-macros/stdbit-macros.h b/libc/include/llvm-libc-macros/stdbit-macros.h
index 5b51068..e3eb663 100644
--- a/libc/include/llvm-libc-macros/stdbit-macros.h
+++ b/libc/include/llvm-libc-macros/stdbit-macros.h
@@ -274,14 +274,14 @@ inline unsigned long long stdc_bit_floor(unsigned long long x) {
unsigned long long: stdc_has_single_bit_ull)(x)
#define stdc_bit_width(x) \
_Generic((x), \
- unsigned char: stdc_bit_width_ui, \
+ unsigned char: stdc_bit_width_uc, \
unsigned short: stdc_bit_width_us, \
unsigned: stdc_bit_width_ui, \
unsigned long: stdc_bit_width_ul, \
unsigned long long: stdc_bit_width_ull)(x)
#define stdc_bit_floor(x) \
_Generic((x), \
- unsigned char: stdc_bit_floor_ui, \
+ unsigned char: stdc_bit_floor_uc, \
unsigned short: stdc_bit_floor_us, \
unsigned: stdc_bit_floor_ui, \
unsigned long: stdc_bit_floor_ul, \