https://github.com/c8ef closed https://github.com/llvm/llvm-project/pull/112539
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
c8ef wrote:
```
Clang :: Analysis/diagnostics/sarif-diagnostics-taint-test.c
Clang :: Analysis/diagnostics/sarif-multi-diagnostic-test.c
Clang :: CXX/drs/cwg3xx.cpp
```
These test failures are unrelated and have been observed in other CI runs.
Let's go ahead and merge this for now.
https://git
https://github.com/c8ef updated https://github.com/llvm/llvm-project/pull/112539
>From dfa1585af3f080987cbd15830c45c34bfecc1fca Mon Sep 17 00:00:00 2001
From: c8ef
Date: Wed, 16 Oct 2024 01:18:13 +
Subject: [PATCH 01/11] implement constexpr builtin {l}abs
---
clang/include/clang/Basic/Buil
c8ef wrote:
Thank you for all your reviews! If there are no further comments, I will
proceed with merging this after updating the branch.
https://github.com/llvm/llvm-project/pull/112539
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https:/
https://github.com/cor3ntin approved this pull request.
lgtm
https://github.com/llvm/llvm-project/pull/112539
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -265,6 +265,15 @@ namespace fpclassify {
char classify_subnorm [__builtin_fpclassify(-1, -1, -1, +1, -1, 1.0e-38f)];
}
+namespace abs {
+ static_assert(__builtin_abs(14) == 14, "");
+ static_assert(__builtin_labs(14L) == 14L, "");
+ static_assert(__builtin_llabs(14LL)
https://github.com/c8ef updated https://github.com/llvm/llvm-project/pull/112539
>From dfa1585af3f080987cbd15830c45c34bfecc1fca Mon Sep 17 00:00:00 2001
From: c8ef
Date: Wed, 16 Oct 2024 01:18:13 +
Subject: [PATCH 01/11] implement constexpr builtin {l}abs
---
clang/include/clang/Basic/Buil
@@ -265,6 +265,15 @@ namespace fpclassify {
char classify_subnorm [__builtin_fpclassify(-1, -1, -1, +1, -1, 1.0e-38f)];
}
+namespace abs {
+ static_assert(__builtin_abs(14) == 14, "");
+ static_assert(__builtin_labs(14L) == 14L, "");
+ static_assert(__builtin_llabs(14LL)
c8ef wrote:
> Please add an entry to `clang/docs/ReleaseNotes.rst`, thanks!
Done.
https://github.com/llvm/llvm-project/pull/112539
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -563,6 +563,19 @@ static bool interp__builtin_fabs(InterpState &S, CodePtr
OpPC,
return true;
}
+static bool interp__builtin_abs(InterpState &S, CodePtr OpPC,
+const InterpFrame *Frame, const Function *Func,
+
@@ -265,6 +265,15 @@ namespace fpclassify {
char classify_subnorm [__builtin_fpclassify(-1, -1, -1, +1, -1, 1.0e-38f)];
}
+namespace abs {
+static_assert(__builtin_abs(14) == 14, "");
+static_assert(__builtin_labs(14L) == 14L, "");
+static_assert(__builtin_llabs(14LL) == 14L
https://github.com/c8ef updated https://github.com/llvm/llvm-project/pull/112539
>From dfa1585af3f080987cbd15830c45c34bfecc1fca Mon Sep 17 00:00:00 2001
From: c8ef
Date: Wed, 16 Oct 2024 01:18:13 +
Subject: [PATCH 01/10] implement constexpr builtin {l}abs
---
clang/include/clang/Basic/Buil
cor3ntin wrote:
Please add an entry to `clang/docs/ReleaseNotes.rst`, thanks!
https://github.com/llvm/llvm-project/pull/112539
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -563,6 +563,19 @@ static bool interp__builtin_fabs(InterpState &S, CodePtr
OpPC,
return true;
}
+static bool interp__builtin_abs(InterpState &S, CodePtr OpPC,
+const InterpFrame *Frame, const Function *Func,
+
@@ -265,6 +265,15 @@ namespace fpclassify {
char classify_subnorm [__builtin_fpclassify(-1, -1, -1, +1, -1, 1.0e-38f)];
}
+namespace abs {
+static_assert(__builtin_abs(14) == 14, "");
+static_assert(__builtin_labs(14L) == 14L, "");
+static_assert(__builtin_llabs(14LL) == 14L
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: None (c8ef)
Changes
According to [P0533R9](https://wg21.link/P0533R9), the C++ standard library
functions corresponding to the C macros in `[c.math.abs]` are now `constexpr`.
To implement this feature in libc++, we must make the built-in
https://github.com/c8ef ready_for_review
https://github.com/llvm/llvm-project/pull/112539
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/c8ef updated https://github.com/llvm/llvm-project/pull/112539
>From dfa1585af3f080987cbd15830c45c34bfecc1fca Mon Sep 17 00:00:00 2001
From: c8ef
Date: Wed, 16 Oct 2024 01:18:13 +
Subject: [PATCH 1/9] implement constexpr builtin {l}abs
---
clang/include/clang/Basic/Builti
https://github.com/c8ef edited https://github.com/llvm/llvm-project/pull/112539
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/c8ef edited https://github.com/llvm/llvm-project/pull/112539
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
20 matches
Mail list logo