https://github.com/philnik777 updated
https://github.com/llvm/llvm-project/pull/138293
>From e735a57745e840f4a19bdd433e823a851890bcbe Mon Sep 17 00:00:00 2001
From: Nikolas Klauser
Date: Fri, 2 May 2025 17:24:13 +0200
Subject: [PATCH] [libc++] Upgrade to GCC 15
---
.github/workflows/libcxx-bu
@@ -3231,6 +3241,230 @@ static QualType builtinCommonTypeImpl(Sema &S,
TemplateName BaseTemplate,
}
}
+static QualType CopyCV(QualType From, QualType To) {
+ if (From.isConstQualified())
+To.addConst();
+ if (From.isVolatileQualified())
+To.addVolatile();
+ retur
philnik777 wrote:
> This seems reasonable to me? I'm not a huge fan of how much is being put into
> `SemaTemplate.cpp` to support all the builtins though. I'm wondering if we
> need to split that up in a follow-up and have a `SemaTemplateBuiltins` for
> all of these to live.
I can take a look
@@ -3231,6 +3241,230 @@ static QualType builtinCommonTypeImpl(Sema &S,
TemplateName BaseTemplate,
}
}
+static QualType CopyCV(QualType From, QualType To) {
+ if (From.isConstQualified())
+To.addConst();
+ if (From.isVolatileQualified())
+To.addVolatile();
+ retur
@@ -3231,6 +3241,230 @@ static QualType builtinCommonTypeImpl(Sema &S,
TemplateName BaseTemplate,
}
}
+static QualType CopyCV(QualType From, QualType To) {
+ if (From.isConstQualified())
+To.addConst();
+ if (From.isVolatileQualified())
+To.addVolatile();
+ retur
philnik777 wrote:
Gentle ping @AaronBallman @cor3ntin
https://github.com/llvm/llvm-project/pull/116709
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/philnik777 updated
https://github.com/llvm/llvm-project/pull/138293
>From 633b22215dd7b4addf5a9e1718a76030dd37f9e9 Mon Sep 17 00:00:00 2001
From: Nikolas Klauser
Date: Fri, 2 May 2025 17:24:13 +0200
Subject: [PATCH] [libc++] Upgrade to GCC 15
---
.github/workflows/libcxx-bu
https://github.com/philnik777 created
https://github.com/llvm/llvm-project/pull/143162
libunwind uses a C linker, so it's never even trying to link against any C++
libraries. This removes the code which tries to drop C++ libraries, which makes
the CMake configuration simpler and allows for upg
https://github.com/philnik777 closed
https://github.com/llvm/llvm-project/pull/143162
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/philnik777 updated
https://github.com/llvm/llvm-project/pull/116709
>From e0bb550672326e21a556ac727f2e2a6ef65f0469 Mon Sep 17 00:00:00 2001
From: Nikolas Klauser
Date: Tue, 1 Oct 2024 11:08:02 +0200
Subject: [PATCH 1/6] [Clang] Add __builtin_invoke and recognize std::invoke a
https://github.com/philnik777 updated
https://github.com/llvm/llvm-project/pull/116709
>From e0bb550672326e21a556ac727f2e2a6ef65f0469 Mon Sep 17 00:00:00 2001
From: Nikolas Klauser
Date: Tue, 1 Oct 2024 11:08:02 +0200
Subject: [PATCH 1/6] [Clang] Add __builtin_invoke and recognize std::invoke a
philnik777 wrote:
> This looks fine. The meaning is clear. (If anything, the C++ standard should
> have a better way to talk about "partial or explicit specializations")
Given that the whole argument to change this is that it's closer to the
standard wording I don't see how the current change
https://github.com/philnik777 requested changes to this pull request.
I don't think this is required, or even works after #143162.
https://github.com/llvm/llvm-project/pull/143533
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.ll
https://github.com/philnik777 requested changes to this pull request.
This seems incorrect. A specialization is instantiated or an explicit
specialization according to https://eel.is/c++draft/temp.spec.general#4, which
is definitely _not_ what we mean.
https://github.com/llvm/llvm-project/pull
https://github.com/philnik777 edited
https://github.com/llvm/llvm-project/pull/143839
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
philnik777 wrote:
Ping
https://github.com/llvm/llvm-project/pull/133699
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/philnik777 commented:
Should we maybe just set `IndentPPDirectives: AfterHash`? We already do that in
libc++, libc++abi and (I think) compiler-rt.
https://github.com/llvm/llvm-project/pull/152861
___
cfe-commits mailing list
cfe-com
@@ -16,7 +16,8 @@
#define _NULLPTR_T
#ifdef __cplusplus
-#if defined(_MSC_EXTENSIONS) && defined(_NATIVE_NULLPTR_SUPPORTED)
+#if __cplusplus >= 201103L ||
\
+(defined(_MSC_EXTENSIONS) && defined(_NATIVE_NULLPTR_SUPPORTED))
https://github.com/philnik777 milestoned
https://github.com/llvm/llvm-project/pull/154610
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -16,7 +16,8 @@
#define _NULLPTR_T
#ifdef __cplusplus
-#if defined(_MSC_EXTENSIONS) && defined(_NATIVE_NULLPTR_SUPPORTED)
+#if __cplusplus >= 201103L ||
\
+(defined(_MSC_EXTENSIONS) && defined(_NATIVE_NULLPTR_SUPPORTED))
@@ -16,7 +16,8 @@
#define _NULLPTR_T
#ifdef __cplusplus
-#if defined(_MSC_EXTENSIONS) && defined(_NATIVE_NULLPTR_SUPPORTED)
+#if __cplusplus >= 201103L ||
\
+(defined(_MSC_EXTENSIONS) && defined(_NATIVE_NULLPTR_SUPPORTED))
@@ -16,7 +16,8 @@
#define _NULLPTR_T
#ifdef __cplusplus
-#if defined(_MSC_EXTENSIONS) && defined(_NATIVE_NULLPTR_SUPPORTED)
+#if __cplusplus >= 201103L ||
\
+(defined(_MSC_EXTENSIONS) && defined(_NATIVE_NULLPTR_SUPPORTED))
@@ -16,7 +16,8 @@
#define _NULLPTR_T
#ifdef __cplusplus
-#if defined(_MSC_EXTENSIONS) && defined(_NATIVE_NULLPTR_SUPPORTED)
+#if __cplusplus >= 201103L ||
\
+(defined(_MSC_EXTENSIONS) && defined(_NATIVE_NULLPTR_SUPPORTED))
philnik777 wrote:
Thanks for having a look so quickly!
https://github.com/llvm/llvm-project/pull/154610
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/philnik777 closed
https://github.com/llvm/llvm-project/pull/154610
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
philnik777 wrote:
/cherry-pick 8b3d4bd
https://github.com/llvm/llvm-project/pull/154610
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/philnik777 edited
https://github.com/llvm/llvm-project/pull/156929
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -6007,7 +6007,7 @@ bool Parser::isConstructorDeclarator(bool IsUnqualified,
bool DeductionGuide,
// A C++11 attribute here signals that we have a constructor, and is an
// attribute on the first constructor parameter.
- if (getLangOpts().CPlusPlus11 &&
+ if (getLangO
philnik777 wrote:
Also, please split this up. It's super hard to review, and these massive
cross-project patches tend to go nowhere.
https://github.com/llvm/llvm-project/pull/156995
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists
philnik777 wrote:
ping
https://github.com/llvm/llvm-project/pull/133699
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
philnik777 wrote:
@yingcong-wu The new test fails on the Arm bots. Please fix it soon or revert
to get the precommit CI green again (finally).
https://github.com/llvm/llvm-project/pull/154902
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
htt
https://github.com/philnik777 updated
https://github.com/llvm/llvm-project/pull/155612
>From d5086ee9311f6667839fbb88f4ef4f99413c11bf Mon Sep 17 00:00:00 2001
From: Nikolas Klauser
Date: Wed, 27 Aug 2025 14:28:22 +0200
Subject: [PATCH] [Clang] Introduce __builtin_meow_synthesises_from_spaceship
https://github.com/philnik777 approved this pull request.
LGTM assuming the CI is happy to get that green again. Though I'm not sure we
want to keep the test as-is. It seems to have quite a few assumptions about the
environment baked in.
https://github.com/llvm/llvm-project/pull/156383
___
philnik777 wrote:
> Please split the PR by subproject to it is easier to review and approve.
Exactly what I was about to say. I don't understand why this happens again and
again though. Maybe we should add some documentation somewhere that
cross-project patches should be split up if it's not s
philnik777 wrote:
IMO the right default alignment would be `alignof(*ptr)`. Objects are pretty
much never underaligned, but they tend to not be overaliend unless you want
something specific - at which point you can use `__builtin_assume_aligned` to
inform the compiler that it can use higher al
@@ -1256,6 +1256,18 @@ def MaskedCompressStore : Builtin {
let Prototype = "void(...)";
}
+def MaskedGather : Builtin {
+ let Spellings = ["__builtin_masked_gather"];
+ let Attributes = [NoThrow, CustomTypeChecking];
philnik777 wrote:
I think this is `pur
https://github.com/philnik777 commented:
Does this actually fix the linked bug report? That's about `always_inline`
functions, which still have default visibility.
https://github.com/llvm/llvm-project/pull/157570
___
cfe-commits mailing list
cfe-commi
@@ -5211,11 +5211,7 @@ class SpellingList {
}
bool hasSpelling() const {
-for (size_t Kind = 0; Kind < NumSpellingKinds; ++Kind) {
- if (Spellings[Kind].size() > 0)
-return true;
-}
-return false;
+return llvm::any_of(Spellings, [](const auto &
https://github.com/philnik777 closed
https://github.com/llvm/llvm-project/pull/155612
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/philnik777 updated
https://github.com/llvm/llvm-project/pull/155612
>From e2125e4c9a9d8f3b45ba28af3a54cf13626a910f Mon Sep 17 00:00:00 2001
From: Nikolas Klauser
Date: Wed, 27 Aug 2025 14:28:22 +0200
Subject: [PATCH] [Clang] Introduce __builtin_meow_synthesises_from_spaceship
@@ -65,15 +65,31 @@ void GH104391() {
M; // expected-warning {{ignoring return value of function declared with
'nodiscard' attribute}}
}
+struct S4 get_s_ignored(void) __attribute__((candiscard));
philnik777 wrote:
There doesn't seem to be any testing for
philnik777 wrote:
> > No. We can drop `_LIBCPP_EXTERN_TEMPLATE_TYPE_VIS` and
> > `_LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS` by replacing it with
> > `_LIBCPP_EXPORTED_FROM_ABI`.
>
> But how will that work when building with MinGW or MSVC? Or is that not
> supported?
Is is supported and keeps
philnik777 wrote:
> This is clever: that way we know it's a pure optimization to call spaceship
> instead of less-than twice. IIUC you'd plan to use this from libc++ to
> optimize eg __find_equal even on user-defined types?
Yes, exactly.
https://github.com/llvm/llvm-project/pull/155612
__
@@ -1232,6 +1232,18 @@ def ConvertVector : Builtin {
let Prototype = "void(...)";
}
+def MaskedLoad : Builtin {
+ let Spellings = ["__builtin_masked_load"];
+ let Attributes = [NoThrow, Const, CustomTypeChecking, Constexpr];
philnik777 wrote:
This also is
@@ -3646,6 +3646,14 @@ def Unavailable : InheritableAttr {
let MeaningfulToClassTemplateDefinition = 1;
}
+def CanDiscard : InheritableAttr {
+ let Spellings = [CXX11<"clang", "candiscard">,
+ GCC<"candiscard">];
philnik777 wrote:
I don't
https://github.com/philnik777 commented:
Also, please remove any CCs in the description. This causes a ping to the
people every time the commit is pushed anywhere on GitHub, causing a lot of
spam.
https://github.com/llvm/llvm-project/pull/154943
___
@@ -199,6 +199,10 @@ Removed Compiler Flags
Attribute Changes in Clang
--
+- A new attribute ``[[clang::candiscard]]`` can be applied to a function
returning a nodiscard type
philnik777 wrote:
IMO `discardable` would be a good name, b
philnik777 wrote:
@tbaederr Thanks! I'll merge it once the fix on our side is ready.
https://github.com/llvm/llvm-project/pull/154610
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/philnik777 approved this pull request.
The libc++ part LGTM.
https://github.com/llvm/llvm-project/pull/158048
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
philnik777 wrote:
> > The libc++ part LGTM.
>
> Any advice on the libcxx buildbot CI failures?
The regex/locale failures on apple platforms are unrelated - most likely due to
an OS update (if we don't fix it soon we'll XFAIL the tests). The android
failures should be fixed in trunk I think, b
https://github.com/philnik777 requested changes to this pull request.
AFAICT both spellings are correct. What's the reasoning for switching it?
https://github.com/llvm/llvm-project/pull/158523
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
htt
https://github.com/philnik777 approved this pull request.
I'm happy with this if it's the preferred way to build things for picolibc.
https://github.com/llvm/llvm-project/pull/158320
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists
https://github.com/philnik777 commented:
FWIW I'm in favour of the renaming. Having consistent naming for the
`__builtin_elementwise_*` and `__builtin_*` functions is IMO much more valuable
than being consistent with compiler-internal naming.
https://github.com/llvm/llvm-project/pull/157128
__
@@ -194,11 +194,19 @@ int main(int, char**) {
ASSERT_NOT_CONSTEXPR_CXX23(std::fminf(1.0f, 0.0f) == 0.0f);
ASSERT_NOT_CONSTEXPR_CXX23(std::fminl(1.0L, 0.0L) == 0.0L);
+#if !__has_constexpr_builtin(__builtin_fma)
ASSERT_NOT_CONSTEXPR_CXX23(std::fma(1.0f, 1.0f, 1.0f) == 2.
https://github.com/philnik777 edited
https://github.com/llvm/llvm-project/pull/158626
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/philnik777 commented:
Is this a good idea? This doesn't just add diagnostics, but also makes it UB to
pass a nullptr to these functions. What do actual libc implementations do when
they are passed a nullptr? Do any of them define that behaviour?
https://github.com/llvm/llvm-
@@ -194,11 +194,19 @@ int main(int, char**) {
ASSERT_NOT_CONSTEXPR_CXX23(std::fminf(1.0f, 0.0f) == 0.0f);
ASSERT_NOT_CONSTEXPR_CXX23(std::fminl(1.0L, 0.0L) == 0.0L);
+#if !__has_constexpr_builtin(__builtin_fma)
ASSERT_NOT_CONSTEXPR_CXX23(std::fma(1.0f, 1.0f, 1.0f) == 2.
@@ -194,11 +194,17 @@ int main(int, char**) {
ASSERT_NOT_CONSTEXPR_CXX23(std::fminf(1.0f, 0.0f) == 0.0f);
ASSERT_NOT_CONSTEXPR_CXX23(std::fminl(1.0L, 0.0L) == 0.0L);
+#if !__has_constexpr_builtin(__builtin_fma)
ASSERT_NOT_CONSTEXPR_CXX23(std::fma(1.0f, 1.0f, 1.0f) == 2.
philnik777 wrote:
> > and just left a 'link' to it here instead?
>
> Also, is there a reason why we can’t just delete this file entirely and put
> the link e.g. in `Builtins.td`/`BuiltinsBase.td`
Since this isn't useful for the tablegen files I'm not sure that makes a ton of
sense. Maybe rath
philnik777 wrote:
> std::is_same<...>::type is the same as std::is_same<...>.
This is technically not true. `is_same::type` names a specialization of
`integral_constant`, not `is_same`.
https://github.com/llvm/llvm-project/pull/160237
___
cfe-commits
@@ -64,3 +101,39 @@ long long rotr64(long long x, unsigned long long y) {
return __builtin_rotateright64(x, y);
}
+// CHECK-LABEL: test_builtin_rotaterightg
+void test_builtin_rotaterightg(unsigned char uc, unsigned short us,
+ unsigned int ui,
@@ -767,12 +767,24 @@ def RotateLeft : BitInt8_16_32_64BuiltinsTemplate,
Builtin {
let Prototype = "T(T, T)";
}
+def RotateLeftg : Builtin {
+ let Spellings = ["__builtin_rotateleftg"];
+ let Attributes = [NoThrow, Const, Constexpr, CustomTypeChecking];
+ let Prototype =
@@ -0,0 +1,20 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
philnik777 wrote:
Should the target be pinned? Then the `#ifdef`s wouldn't be necessary anymore I
think.
https://github.com/llvm/llvm-project/pull/160259
_
@@ -0,0 +1,20 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+// expected-no-diagnostics
+
+char stdc_rotateleft1[__builtin_stdc_rotate_left((unsigned char)0xB1, 3) ==
0x8D ? 1 : -1];
philnik777 wrote:
I'm pretty sure `static_assert`s are the recommended way to
https://github.com/philnik777 commented:
Oh, you should also update the title.
https://github.com/llvm/llvm-project/pull/160259
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
philnik777 wrote:
But please add the reasoning in the description.
https://github.com/llvm/llvm-project/pull/158523
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/philnik777 approved this pull request.
LGTM, but let's wait for one of the Clang people to take another look.
https://github.com/llvm/llvm-project/pull/160259
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm
601 - 667 of 667 matches
Mail list logo