https://bugs.llvm.org/show_bug.cgi?id=46016
Bug ID: 46016
Summary: std::to_chars generates exception code
Product: libc++
Version: 10.0
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: All Bugs
Assignee: unassignedclangb...@nondot.org
Reporter: m...@hanicka.net
CC: llvm-bugs@lists.llvm.org, mclow.li...@gmail.com
`std::to_chars` is generating exception handling code, because internals
functions are not marked `noexcept` and clang can't proof they won't throw:
```
namespace __itoa {
_LIBCPP_FUNC_VIS char* __u64toa(uint64_t __value, char* __buffer);
_LIBCPP_FUNC_VIS char* __u32toa(uint32_t __value, char* __buffer);
}
```
if you add `noexcept` there it will generate more efficient code:
https://compiler-explorer.com/z/H29awf
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs