[libc-commits] [PATCH] D94634: [libc][NFC] change isblank and iscntrl from implicit casting
Michael Jones via Phabricator via libc-commits
libc-commits at lists.llvm.org
Wed Jan 13 14:07:12 PST 2021
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGea8034ec35a9: [libc][NFC] change isblank and iscntrl from implicit casting (authored by michaelrj).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D94634/new/
https://reviews.llvm.org/D94634
Files:
libc/src/ctype/isblank.cpp
libc/src/ctype/iscntrl.cpp
Index: libc/src/ctype/iscntrl.cpp
===================================================================
--- libc/src/ctype/iscntrl.cpp
+++ libc/src/ctype/iscntrl.cpp
@@ -15,7 +15,7 @@
// TODO: Currently restricted to default locale.
// These should be extended using locale information.
LLVM_LIBC_FUNCTION(int, iscntrl, (int c)) {
- const unsigned char ch = c;
+ const unsigned char ch = static_cast<char>(c);
return ch < 0x20 || ch == 0x7f;
}
Index: libc/src/ctype/isblank.cpp
===================================================================
--- libc/src/ctype/isblank.cpp
+++ libc/src/ctype/isblank.cpp
@@ -15,7 +15,7 @@
// TODO: Currently restricted to default locale.
// These should be extended using locale information.
LLVM_LIBC_FUNCTION(int, isblank, (int c)) {
- const unsigned char ch = c;
+ const unsigned char ch = static_cast<char>(c);
return ch == ' ' || ch == '\t';
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D94634.316514.patch
Type: text/x-patch
Size: 906 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20210113/bb10106f/attachment.bin>
More information about the libc-commits
mailing list