diff options
author | Yuxuan Chen <ych@fb.com> | 2025-09-08 14:17:59 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-09-08 14:17:59 -0700 |
commit | 353d6a98bfdceabd1f08801baf90699148a6c8c3 (patch) | |
tree | 48dc574c8efd157f8d2d6eeec6f3e492a57b9e40 /clang/lib/Frontend/CompilerInstance.cpp | |
parent | 132bacde223c449006bf205928937ca5a1dcd711 (diff) | |
download | llvm-353d6a98bfdceabd1f08801baf90699148a6c8c3.zip llvm-353d6a98bfdceabd1f08801baf90699148a6c8c3.tar.gz llvm-353d6a98bfdceabd1f08801baf90699148a6c8c3.tar.bz2 |
[libc++] Conditionally declare `lgamma_r` as noexcept (#156547)
An older PR https://github.com/llvm/llvm-project/pull/102036 suggested
that LLVM libc declares `lgamma_r` as noexcept and is incompatible with
this redeclaration. However, I recently discovered that glibc also
declares the math functions to be noexcept under C++ mode.
This line usually don't cause issues because both the glibc and this
file are included as "system headers". According to [this
godbolt](https://godbolt.org/z/o7Wd9PP58), both GCC and clang ignore the
different exception specification between multiple declarations if they
are in system headers.
However, this seems not the case for NVCC/EDG, so a fix for this
redeclaration is still desirable. This patch proposes that we should
declare the function as noexcept under known libc integrations to keep
the declared function consistent.
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
0 files changed, 0 insertions, 0 deletions