[clang] [Clang] Fix crash due to invalid source location in __is_trivially_equality_comparable (PR #107815)

2024-09-10 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 closed https://github.com/llvm/llvm-project/pull/107815 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix crash due to invalid source location in __is_trivially_equality_comparable (PR #107815)

2024-09-10 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 milestoned https://github.com/llvm/llvm-project/pull/107815 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix crash due to invalid source location in __is_trivially_equality_comparable (PR #107815)

2024-09-10 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: /cherry-pick 6dbdb84 https://github.com/llvm/llvm-project/pull/107815 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang] Extend diagnose_if to accept more detailed warning information (PR #70976)

2024-09-10 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: @AaronBallman @erichkeane is there anything else to do before merging? It would be nice to merge this somewhat early in the release cycle, since I suspect this might be reverted a few times. https://github.com/llvm/llvm-project/pull/70976 _

[clang] [libcxx] [Clang] Add __common_type builtin (PR #99473)

2024-08-10 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/99473 >From d6903daf0da6979822b8981ea3641455ff6d06f8 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Tue, 16 Jul 2024 14:48:10 +0200 Subject: [PATCH 1/6] [Clang] Add __common_type builtin --- clang/include/cl

[clang] [Clang] Add [[clang::diagnose_specializations]] (PR #101469)

2024-08-10 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/101469 >From 82ab798fc72c6de64ae527d96393f0dc67307e98 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Thu, 1 Aug 2024 12:30:22 +0200 Subject: [PATCH 1/5] [Clang] Add [[clang::diagnose_specializations]] --- cl

[clang] [clang] Reject VLAs in `__is_layout_compatible()` (PR #87737)

2024-04-05 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: I think clang should reject incomplete types when the standard says so. It doesn't seem particularly useful to accept some special cases but reject incomplete types in general. All the traits should probably be audited once. It looks like Clang has other problematic cases: ht

[clang] [Clang] Reduce the size of Decl and classes derived from it (PR #87361)

2024-04-08 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/87361 >From b8a626116b0719c1acf75e9e7300df8e2bf82f99 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Tue, 2 Apr 2024 18:00:05 +0200 Subject: [PATCH 1/2] [Clang] Reduce the size of Decl and classes derived from

[clang] [Clang] Reduce the size of Decl and classes derived from it (PR #87361)

2024-04-08 Thread Nikolas Klauser via cfe-commits
@@ -268,17 +268,34 @@ class alignas(8) Decl { /// } /// void A::f(); // SemanticDC == namespace 'A' ///// LexicalDC == global namespace - llvm::PointerUnion DeclCtx; + llvm::PointerIntPair< philnik777 wrote: IDK. I'm personally not

[clang] [C99] Claim conformance for _Complex support (PR #88161)

2024-04-10 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: Note that ```c++ auto div(_Complex float lhs, _Complex float rhs) { return lhs / rhs; } int main() { return __real div(1.f, 2.f); } ``` will fail to link on windows due to `__divsc3` not being available. Similar programs probably also fail due to other compiler-rt function

[clang] [C99] Claim conformance for _Complex support (PR #88161)

2024-04-11 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: > > Note that > > ```c++ > > auto div(_Complex float lhs, _Complex float rhs) { > > return lhs / rhs; > > } > > > > int main() { > > return __real div(1.f, 2.f); > > } > > ``` > > > > > > > > > > > > > > > > > > > > > > > > will fail

[clang] [C99] Claim conformance for _Complex support (PR #88161)

2024-04-11 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 approved this pull request. LGTM from my side. I'll leave the conformance test details to the folks who know what they're doing. https://github.com/llvm/llvm-project/pull/88161 ___ cfe-commits mailing list cfe-commits@lis

[clang] [Clang] Reduce the size of Decl and classes derived from it (PR #87361)

2024-04-12 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/87361 >From b8a626116b0719c1acf75e9e7300df8e2bf82f99 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Tue, 2 Apr 2024 18:00:05 +0200 Subject: [PATCH 1/3] [Clang] Reduce the size of Decl and classes derived from

[clang] [Clang] Fix __is_trivially_equaltiy_comparable documentation (PR #88528)

2024-04-12 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/88528 Currently `__is_trivially_equality_comparable` is documented to return true if comparing the value representation is equivalent to calling the comparison operator, which is not quite what the trait actually c

[clang] [Clang] Reduce the size of Decl and classes derived from it (PR #87361)

2024-04-13 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/87361 >From b8a626116b0719c1acf75e9e7300df8e2bf82f99 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Tue, 2 Apr 2024 18:00:05 +0200 Subject: [PATCH 1/3] [Clang] Reduce the size of Decl and classes derived from

[clang] [clang][docs] fix whitespace in AttrDocs.td (PR #88631)

2024-04-13 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 closed https://github.com/llvm/llvm-project/pull/88631 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Reduce the size of Decl and classes derived from it (PR #87361)

2024-04-14 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/87361 >From b8a626116b0719c1acf75e9e7300df8e2bf82f99 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Tue, 2 Apr 2024 18:00:05 +0200 Subject: [PATCH 1/3] [Clang] Reduce the size of Decl and classes derived from

[clang] [Clang] Reduce the size of Decl and classes derived from it (PR #87361)

2024-04-14 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 closed https://github.com/llvm/llvm-project/pull/87361 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "[Clang] Reduce the size of Decl and classes derived from it" (PR #88654)

2024-04-14 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/88654 Reverts llvm/llvm-project#87361 On 32 bit platforms there is only a single bit available in the `DeclCtx`, resulting in an assertion failure. >From b243ca1d3616d1dd61b81e3a112707e27cd4c865 Mon Sep 17 00:00:

[clang] Revert "[Clang] Reduce the size of Decl and classes derived from it" (PR #88654)

2024-04-14 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 closed https://github.com/llvm/llvm-project/pull/88654 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Enable LLDB tests in Linux pre-merge CI (PR #94208)

2024-06-07 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: FYI in the libc++ CI we've been running the LLDB tests for a few months now and I haven't seen a single unrelated failure. https://github.com/llvm/llvm-project/pull/94208 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:

[clang] [clang] Add value_type attr, use it to add noalias when pass-by-value. (PR #95004)

2024-06-10 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: This is really sweet. However, I feel like this is a property that needs to propagate through types. We can't guarantee that a `std::vector>` doesn't escape the pointer. Similarly, I think we'd like ```c++ struct my_pair { int i; std::string str; }; ``` to have this proper

[clang] [Clang] Fix __is_trivially_equality_comparable returning true with ineligebile defaulted overloads (PR #93113)

2024-06-13 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: gentle ping https://github.com/llvm/llvm-project/pull/93113 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][NFC] Avoid opening namespace std (PR #95470)

2024-06-13 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/95470 Never opening `namespace std` avoids even the possibility of introducing new symbols as well as making the code a bit shorter by removing unnecessary boiler plate. >From f5fc162cd1a6fdef3dcdc3e4c73aedcf67b

[clang] [Clang][NFC] Avoid opening namespace std (PR #95470)

2024-06-14 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/95470 >From ee78c1e22b81ef3beb4e28e4ea778ab3a80b1f2d Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Thu, 13 Jun 2024 22:24:17 +0200 Subject: [PATCH] [Clang] Avoid opening namespace std --- clang/include/clan

[clang] [Clang][NFC] Avoid opening namespace std (PR #95470)

2024-06-14 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 closed https://github.com/llvm/llvm-project/pull/95470 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Clang: Support minimumnum and maximumnum intrinsics (PR #96281)

2024-06-21 Thread Nikolas Klauser via cfe-commits
@@ -3636,6 +3648,22 @@ def Fmin : FPMathTemplate, LibBuiltin<"math.h"> { let OnlyBuiltinPrefixedAliasIsConstexpr = 1; } +def FmaximumNum : FPMathTemplate, LibBuiltin<"math.h"> { philnik777 wrote: Why is this a libbuiltin? IIUC this is only supposed to be an

[clang] [Clang] Fix __is_trivially_equality_comparable returning true with ineligebile defaulted overloads (PR #93113)

2024-06-01 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/93113 >From cabff5972424393e9d76bce4f8015ceed331a5f9 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Thu, 23 May 2024 01:48:06 +0200 Subject: [PATCH] [Clang] Fix __is_trivially_equality_comparable returning tru

[clang] [Clang] Fix __is_trivially_equality_comparable returning true with ineligebile defaulted overloads (PR #93113)

2024-06-02 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/93113 >From d1507bf2be71940c795925cdc8159cbc90b17f0d Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Thu, 23 May 2024 01:48:06 +0200 Subject: [PATCH] [Clang] Fix __is_trivially_equality_comparable returning tru

[clang] [Clang] Fix __is_trivially_equaltiy_comparable documentation (PR #88528)

2024-04-22 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/88528 >From 0c9372749f4b2d52deddea82be4e77524a66a348 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Fri, 12 Apr 2024 17:36:53 +0200 Subject: [PATCH] [Clang] Fix __is_trivially_equaltiy_comparable documentation

[clang] [Clang] Fix __is_trivially_equaltiy_comparable documentation (PR #88528)

2024-04-22 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 closed https://github.com/llvm/llvm-project/pull/88528 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++17] Support __GCC_[CON|DE]STRUCTIVE_SIZE (PR #89446)

2024-04-22 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: @AaronBallman thanks for picking this up! I agree with @cor3ntin and @ldionne that we should provide the macros unconditionally. This brings us one step closer to finally making libc++ fully conforming in C++17. With the PSTL finally making steady progress, we're probably onl

[clang] [libcxx] [Clang] Add __common_type builtin (PR #99473)

2024-07-23 Thread Nikolas Klauser via cfe-commits
@@ -6844,6 +6844,14 @@ CXXRecordMembersNamed(StringRef Name, Sema &S, QualType Ty) { return Results; } +QualType Sema::getTypeMember(StringRef Name, QualType Type) { philnik777 wrote: `CXXRecordMembersNamed` is used in `hasCStrMethod` below as well. Should

[clang] [libcxx] [Clang] Add __common_type builtin (PR #99473)

2024-07-25 Thread Nikolas Klauser via cfe-commits
@@ -1599,13 +1599,66 @@ createTypePackElementParameterList(const ASTContext &C, DeclContext *DC) { nullptr); } +static TemplateParameterList *createCommonTypeList(const ASTContext &C, + D

[clang] [libcxx] [Clang] Add __common_type builtin (PR #99473)

2024-07-25 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/99473 >From d6903daf0da6979822b8981ea3641455ff6d06f8 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Tue, 16 Jul 2024 14:48:10 +0200 Subject: [PATCH 1/2] [Clang] Add __common_type builtin --- clang/include/cl

[clang] [libcxx] [Clang] Add __common_type builtin (PR #99473)

2024-07-25 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/99473 >From d6903daf0da6979822b8981ea3641455ff6d06f8 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Tue, 16 Jul 2024 14:48:10 +0200 Subject: [PATCH 1/4] [Clang] Add __common_type builtin --- clang/include/cl

[clang] [clang] Remove `__is_layout_compatible` from revertible type traits list (PR #100572)

2024-07-25 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: Should we also rename to `__builtin_is_layout_compatible`? https://github.com/llvm/llvm-project/pull/100572 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [Clang] Add __common_type builtin (PR #99473)

2024-07-25 Thread Nikolas Klauser via cfe-commits
@@ -3058,6 +3058,133 @@ void Sema::NoteAllFoundTemplates(TemplateName Name) { } } +static QualType commonTypeImpl(Sema &S, TemplateName BaseTemplate, + SourceLocation TemplateLoc, + ArrayRef Ts) { + auto lookUpComm

[clang] [libcxx] [Clang] Add __common_type builtin (PR #99473)

2024-07-25 Thread Nikolas Klauser via cfe-commits
@@ -3058,6 +3058,133 @@ void Sema::NoteAllFoundTemplates(TemplateName Name) { } } +static QualType commonTypeImpl(Sema &S, TemplateName BaseTemplate, + SourceLocation TemplateLoc, + ArrayRef Ts) { + auto lookUpComm

[clang] [Clang] Remove __is_nullptr (PR #99038)

2024-07-31 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/99038 >From fbc9ebb3900e69f2485111cfdc6b7a7dfd3e6ebe Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Tue, 16 Jul 2024 14:53:30 +0200 Subject: [PATCH 1/2] [Clang] Remove __is_nullptr --- clang/docs/LanguageExt

[clang] [Clang] Remove __is_nullptr (PR #99038)

2024-07-16 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/99038 `is_null_pointer` can be implemented very efficiently as `__is_same(__remove_cv(T), decltype(nullptr))`. Since GCC supports both of these builtins as well, libc++ has no interest in using `__is_nullptr` inste

[clang] [Clang] Remove __is_nullptr (PR #99038)

2024-07-16 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: > I mostly support the removal but I'd feel more comfortable documenting the > extension as deprecated in Clang 19, adding a release note warning users > about it going away and what the replacement code would look like, and then > remove `__is_nullptr()` in Clang 20. (edited

[clang] [Clang] Add __common_type builtin (PR #99473)

2024-07-18 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/99473 This implements the logic of the `common_type` base template as a builtin alias. If there should be no `type` member, an empty class is returned. Otherwise a specialization of a `type_identity`-like class is

[clang] [libcxx] [Clang] Add __common_type builtin (PR #99473)

2024-07-18 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/99473 >From f9b9431a97952909190c69e1dee188ef234addb2 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Tue, 16 Jul 2024 14:48:10 +0200 Subject: [PATCH] [Clang] Add __common_type builtin --- clang/include/clang/

[clang] [libcxx] [Clang] Add __common_type builtin (PR #99473)

2024-07-19 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/99473 >From 22513d53967ac32ae4112499c33c7c481b52b2fd Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Tue, 16 Jul 2024 14:48:10 +0200 Subject: [PATCH] [Clang] Add __common_type builtin --- clang/include/clang/

[clang] [libcxx] [Clang] Add __common_type builtin (PR #99473)

2024-07-19 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/99473 >From d11417d4addd7a5da5436e9fb406748a3059e17c Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Tue, 16 Jul 2024 14:48:10 +0200 Subject: [PATCH] [Clang] Add __common_type builtin --- clang/include/clang/

[clang] [libcxx] [Clang] Add __common_type builtin (PR #99473)

2024-07-19 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/99473 >From f034248ddb55ff2184662e0558c078f8109c0e00 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Tue, 16 Jul 2024 14:48:10 +0200 Subject: [PATCH] [Clang] Add __common_type builtin --- clang/include/clang/

[clang] [libcxx] [Clang] Add __common_type builtin (PR #99473)

2024-07-19 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/99473 >From d6903daf0da6979822b8981ea3641455ff6d06f8 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Tue, 16 Jul 2024 14:48:10 +0200 Subject: [PATCH] [Clang] Add __common_type builtin --- clang/include/clang/

[clang] [libcxx] [Clang] Add __common_type builtin (PR #99473)

2024-07-19 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 ready_for_review https://github.com/llvm/llvm-project/pull/99473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [Clang] Add __common_type builtin (PR #99473)

2024-07-19 Thread Nikolas Klauser via cfe-commits
@@ -3058,6 +3058,141 @@ void Sema::NoteAllFoundTemplates(TemplateName Name) { } } +static std::optional commonTypeImpl(Sema &S, + TemplateName BaseTemplate, + SourceLocation TemplateLoc

[clang] [libcxx] [Clang] Add __common_type builtin (PR #99473)

2024-07-19 Thread Nikolas Klauser via cfe-commits
@@ -3058,6 +3058,141 @@ void Sema::NoteAllFoundTemplates(TemplateName Name) { } } +static std::optional commonTypeImpl(Sema &S, + TemplateName BaseTemplate, + SourceLocation TemplateLoc

[clang] [clang] Constexpr for __builtin_shufflevector and __builtin_convertvector (PR #76615)

2024-04-24 Thread Nikolas Klauser via cfe-commits
Pol Marcet =?utf-8?q?Sardà?= , Pol Marcet =?utf-8?q?Sardà?= , Pol Marcet =?utf-8?q?Sardà?= , Pol Marcet =?utf-8?q?Sardà?= Message-ID: In-Reply-To: philnik777 wrote: I just wanted to say thanks for working on this. I'd love to enable the vectorization branches in libc++ during constant evaluat

[clang] [C++23] [CLANG] Adding C++23 constexpr math functions: fmin and frexp. (PR #88978)

2024-04-28 Thread Nikolas Klauser via cfe-commits
@@ -14638,6 +14649,8 @@ bool FloatExprEvaluator::VisitCallExpr(const CallExpr *E) { return true; } + case Builtin::BIfmin: + case Builtin::BIfminf: philnik777 wrote: These have to be made `constexpr`, at least in C++23. C++ stdlibs can't override th

[clang] [C++23] [CLANG] Adding C++23 constexpr math functions: fmin and frexp. (PR #88978)

2024-04-29 Thread Nikolas Klauser via cfe-commits
@@ -14638,6 +14649,8 @@ bool FloatExprEvaluator::VisitCallExpr(const CallExpr *E) { return true; } + case Builtin::BIfmin: + case Builtin::BIfminf: philnik777 wrote: How would that help? https://github.com/llvm/llvm-project/pull/88978 __

[clang] [compiler-rt] [libcxx] [lld] [lldb] [llvm] [mlir] [polly] python: use raw strings for regex (PR #105990)

2024-08-27 Thread Nikolas Klauser via cfe-commits
@@ -284,7 +284,7 @@ def sync_csv(rows: List[Tuple], from_github: List[PaperInfo]) -> List[Tuple]: results.append(gh.for_printing()) continue elif paper.status != gh.status: -print(f"We found a CSV row and a Github issue with differen

[clang] [Clang] restrict use of attribute names reserved by the C++ standard (PR #106036)

2024-08-28 Thread Nikolas Klauser via cfe-commits
@@ -0,0 +1,33 @@ +// RUN: %clang_cc1 -fsyntax-only -verify=expected,cxx11 -pedantic -std=c++11 %s +// RUN: %clang_cc1 -fsyntax-only -verify=expected,cxx14 -pedantic -std=c++14 %s +// RUN: %clang_cc1 -fsyntax-only -verify=expected,cxx17 -pedantic -std=c++17 %s +// RUN: %clang_cc1 -

[clang] [Clang] restrict use of attribute names reserved by the C++ standard (PR #106036)

2024-08-28 Thread Nikolas Klauser via cfe-commits
@@ -177,6 +177,26 @@ static bool isLanguageDefinedBuiltin(const SourceManager &SourceMgr, return false; } +static bool isReservedAttrName(Preprocessor &PP, IdentifierInfo *II) { philnik777 wrote: `-nostdlib` doesn't imply that you don't have a standard lib

[clang] [Clang] Add [[clang::no_specializations]] (PR #101469)

2024-08-29 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: > > I did think about it more, and I think it would be more consistent to > > support the attribute on any sort of specializable entity, including > > functions - regardless of STL needs @AaronBallman @ldionne > > Agreed; if we're adding a custom attribute, we might as well s

[clang] [Clang] Add [[clang::no_specializations]] (PR #101469)

2024-08-29 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: > > > > I did think about it more, and I think it would be more consistent to > > > > support the attribute on any sort of specializable entity, including > > > > functions - regardless of STL needs @AaronBallman @ldionne > > > > > > > > > Agreed; if we're adding a custom at

[clang] [Clang][NFC] Don't manually enumerate the PredefinedDeclIDs (PR #106891)

2024-09-01 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 ready_for_review https://github.com/llvm/llvm-project/pull/106891 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][NFC] Don't manually enumerate the PredefinedDeclIDs (PR #106891)

2024-09-01 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 closed https://github.com/llvm/llvm-project/pull/106891 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][NFC] Don't manually enumerate the PredefinedDeclIDs (PR #106891)

2024-09-01 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/106891 This doesn't seem to have any use other than the possibility of merge conflicts and accidentally forgetting to update `NUM_PREDEF_DECL_IDS`. >From 29cd14dff005175d30598f19a370b6ebb48a8c0e Mon Sep 17 00:00:0

[clang] [Clang] restrict use of attribute names reserved by the C++ standard (PR #106036)

2024-09-01 Thread Nikolas Klauser via cfe-commits
@@ -177,6 +177,26 @@ static bool isLanguageDefinedBuiltin(const SourceManager &SourceMgr, return false; } +static bool isReservedAttrName(Preprocessor &PP, IdentifierInfo *II) { philnik777 wrote: Yes, that's a supported extension. https://github.com/llvm/

[clang] [Clang] Start moving X86Builtins.def to X86Builtins.td (PR #106005)

2024-09-03 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: > @philnik777 Is this part of a larger scheme covering other targets? Ultimately all the builtins should be in TableGen files instead of the `.def` files, but that's going to take a while. Probably years, since it's not exactly high priority. https://github.com/llvm/llvm-pro

[clang] Reapply "[Clang] Fix __is_trivially_equality_comparable returning true with ineligebile defaulted overloads" (#97002) (PR #97894)

2024-07-09 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: @cor3ntin The `S.CreateOverloadedBinOp` (line 5226) now gets a real location (the keyword location - seemed the most appropriate to me). The problem was that during overload resolution something got instantiated and that requires a real location. Although I'm not sure why tha

[clang] [clang-tools-extra] [clang] Extend diagnose_if to accept more detailed warning information (PR #70976)

2024-07-10 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 commented: > Sorry for the delay in review! No worries! I dropped this for a few months myself. I can't expect to get a review within days when doing that :D > This seems like the right direction to go, in general. As @erichkeane, it's a > bit hard to review due

[clang] [clang-tools-extra] [clang] Extend diagnose_if to accept more detailed warning information (PR #70976)

2024-07-10 Thread Nikolas Klauser via cfe-commits
@@ -0,0 +1,45 @@ +// RUN: %clang_cc1 %s -verify -fno-builtin -Werror=comment -Wno-error=abi -Wfatal-errors=assume -Wno-fatal-errors=assume + +#define diagnose_if(...) __attribute__((diagnose_if(__VA_ARGS__))) + +template +void diagnose_if_wcomma() diagnose_if(b, "oh no", "warnin

[clang] [clang-tools-extra] [clang] Extend diagnose_if to accept more detailed warning information (PR #70976)

2024-07-10 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 edited https://github.com/llvm/llvm-project/pull/70976 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reapply "[Clang] Fix __is_trivially_equality_comparable returning true with ineligebile defaulted overloads" (#97002) (PR #97894)

2024-07-12 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 closed https://github.com/llvm/llvm-project/pull/97894 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [clang] [libc++] P3309 constexpr atomic and atomic ref [WIP] (PR #98738)

2024-07-13 Thread Nikolas Klauser via cfe-commits
Hana =?utf-8?q?Dusíková?= , Hana =?utf-8?q?Dusíková?= Message-ID: In-Reply-To: philnik777 wrote: Could you split this up into separate patches for the Clang and libc++ changes? The Clang changes can probably be landed independently of LWG, but for the libc++ changes we almost always wait

[clang] [libcxx] [clang] [libc++] P3309 constexpr atomic and atomic ref [WIP] (PR #98738)

2024-07-13 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: > @philnik777 I would rather not, at least for the review, manipulating two > branches will be cumbersome. I can split it before merging, but as I don't > expect this to happen soon, it should be fine. This is less about having two separate commits than having mostly unrelate

[clang] [clang-tools-extra] [clang] Extend diagnose_if to accept more detailed warning information (PR #70976)

2024-07-14 Thread Nikolas Klauser via cfe-commits
@@ -0,0 +1,45 @@ +// RUN: %clang_cc1 %s -verify -fno-builtin -Werror=comment -Wno-error=abi -Wfatal-errors=assume -Wno-fatal-errors=assume + +#define diagnose_if(...) __attribute__((diagnose_if(__VA_ARGS__))) + +template +void diagnose_if_wcomma() diagnose_if(b, "oh no", "warnin

[clang] [clang-tools-extra] [clang] Extend diagnose_if to accept more detailed warning information (PR #70976)

2024-07-14 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/70976 >From a91f499900d4cea4804833d004b6c4e54a7d8b15 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Sun, 3 Sep 2023 17:26:28 -0700 Subject: [PATCH 1/7] [clang] Extend diagnose_if to accept more detailed warni

[clang] [Clang] Ensure "=default"ed function can be deleted when used as an extension in C++03 (PR #90725)

2024-05-01 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: Note that this is also a problem with an implicit assignment operator: https://godbolt.org/z/jrh5novMo. I'm not 100% sure it's not a bug, but it definitely looks to me like one. It's definitely a mismatch between C++03 and C++11, which I wouldn't expect given that `= delete`

[clang] [Clang] Add __builtin_selectvector and use it for AVX512 intrinsics (PR #91306)

2024-05-07 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 edited https://github.com/llvm/llvm-project/pull/91306 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix __is_array returning true for zero-sized arrays (PR #86652)

2024-05-11 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: @AaronBallman Any thoughts on how we should proceed here? https://github.com/llvm/llvm-project/pull/86652 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Accept lambdas in C++03 as an extensions (PR #73376)

2024-05-16 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: I'm not sure a crash is ever expected, but it's a known issue. https://github.com/llvm/llvm-project/pull/73376 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add __builtin_selectvector and use it for AVX512 intrinsics (PR #91306)

2024-05-16 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 edited https://github.com/llvm/llvm-project/pull/91306 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add __builtin_selectvector and use it for AVX512 intrinsics (PR #91306)

2024-05-16 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 ready_for_review https://github.com/llvm/llvm-project/pull/91306 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add __builtin_selectvector and use it for AVX512 intrinsics (PR #91306)

2024-05-16 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: I don't understand why the order of emitted instructions changes based on how exactly Clang is compiled, but other than that this should be ready. Hopefully someone spots what the problem could be. https://github.com/llvm/llvm-project/pull/91306 __

[clang] [Clang] Fix __is_array returning true for zero-sized arrays (PR #86652)

2024-05-18 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/86652 >From 90f88bdac3dc40635c58f3f67e29354e6a32896e Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Tue, 26 Mar 2024 12:23:24 +0100 Subject: [PATCH] [Clang] Fix __is_array returning true for zero-sized arrays

[clang] [Clang] Fix __is_array returning true for zero-sized arrays (PR #86652)

2024-05-18 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/86652 >From 90f88bdac3dc40635c58f3f67e29354e6a32896e Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Tue, 26 Mar 2024 12:23:24 +0100 Subject: [PATCH] [Clang] Fix __is_array returning true for zero-sized arrays

[clang] [Clang] Fix __is_array returning true for zero-sized arrays (PR #86652)

2024-05-18 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/86652 >From 90f88bdac3dc40635c58f3f67e29354e6a32896e Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Tue, 26 Mar 2024 12:23:24 +0100 Subject: [PATCH] [Clang] Fix __is_array returning true for zero-sized arrays

[clang] [llvm] [C++23] [CLANG] Adding C++23 constexpr math functions: fmin, fmax and frexp. (PR #88978)

2024-05-19 Thread Nikolas Klauser via cfe-commits
@@ -3452,9 +3452,10 @@ def Fmod : FPMathTemplate, LibBuiltin<"math.h"> { def Frexp : FPMathTemplate, LibBuiltin<"math.h"> { let Spellings = ["frexp"]; - let Attributes = [NoThrow]; + let Attributes = [NoThrow, Constexpr]; philnik777 wrote: This also influ

[clang] [Clang] Fix __is_array returning true for zero-sized arrays (PR #86652)

2024-05-20 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 closed https://github.com/llvm/llvm-project/pull/86652 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix __is_trivially_equality_comparable returning true with ineligebile defaulted overloads (PR #93113)

2024-05-22 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/93113 This changes `__is_trivially_equality_comparable` to do overload resolution instead, which fixes a couple of false-positives (and a false-negative as a drive-by). Fixes #89293 >From 53b52a07f8720db4495b93

[clang] [Clang] Fix __is_trivially_equality_comparable returning true with ineligebile defaulted overloads (PR #93113)

2024-05-22 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/93113 >From 31e334643e7b4fa4a87c8d15efab4036306d Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Thu, 23 May 2024 01:48:06 +0200 Subject: [PATCH] [Clang] Fix __is_trivially_equality_comparable returning tru

[clang] [Clang] Fix __is_trivially_equality_comparable returning true with ineligebile defaulted overloads (PR #93113)

2024-05-22 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 ready_for_review https://github.com/llvm/llvm-project/pull/93113 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [Clang] Add __common_type builtin (PR #99473)

2024-07-31 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 commented: > How much of a performance difference are you measuring with this change? That depends heavily on what you're looking at. For `common_type`s with a lot of builtin types, I've seen a 10x improvement. When it's basically just combining specializations I'

[clang] [libcxx] [Clang] Add __common_type builtin (PR #99473)

2024-07-31 Thread Nikolas Klauser via cfe-commits
@@ -3058,6 +3058,133 @@ void Sema::NoteAllFoundTemplates(TemplateName Name) { } } +static QualType commonTypeImpl(Sema &S, TemplateName BaseTemplate, + SourceLocation TemplateLoc, + ArrayRef Ts) { + auto lookUpComm

[clang] [libcxx] [Clang] Add __common_type builtin (PR #99473)

2024-07-31 Thread Nikolas Klauser via cfe-commits
@@ -3058,6 +3058,133 @@ void Sema::NoteAllFoundTemplates(TemplateName Name) { } } +static QualType commonTypeImpl(Sema &S, TemplateName BaseTemplate, + SourceLocation TemplateLoc, + ArrayRef Ts) { + auto lookUpComm

[clang] [libcxx] [Clang] Add __common_type builtin (PR #99473)

2024-07-31 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/99473 >From d6903daf0da6979822b8981ea3641455ff6d06f8 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Tue, 16 Jul 2024 14:48:10 +0200 Subject: [PATCH 1/5] [Clang] Add __common_type builtin --- clang/include/cl

[clang] [libcxx] [Clang] Add __common_type builtin (PR #99473)

2024-07-31 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 edited https://github.com/llvm/llvm-project/pull/99473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [Clang] Add __common_type builtin (PR #99473)

2024-07-31 Thread Nikolas Klauser via cfe-commits
@@ -3058,6 +3058,133 @@ void Sema::NoteAllFoundTemplates(TemplateName Name) { } } +static QualType commonTypeImpl(Sema &S, TemplateName BaseTemplate, + SourceLocation TemplateLoc, + ArrayRef Ts) { + auto lookUpComm

[clang] [Clang] Add [[clang::diagnose_specializations]] (PR #101469)

2024-08-01 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/101469 This can be used to inform users when a template should not be specialized. For example, this is the case for the standard type traits (except for `common_type` and `common_reference`, which have more compli

[clang] [Clang] Add [[clang::diagnose_specializations]] (PR #101469)

2024-08-01 Thread Nikolas Klauser via cfe-commits
@@ -975,6 +975,15 @@ Query for this feature with ``__has_attribute(diagnose_if)``. }]; } +def DiagnoseSpecializationsDocs : Documentation { + let Category = DocCatDecl; + let Content = [{ +``clang::diagnose_specializations`` can be appied to class templates which +should

[clang] [Clang] Add [[clang::diagnose_specializations]] (PR #101469)

2024-08-01 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: > Also consider adding an argument that lets you diagnose > https://eel.is/c++draft/namespace.std#2.1 > > > * the added declaration depends on at least one program-defined type, > > To diagnose specializations for `std::pair`, but allow > `std::pair`. Given that this seems

[clang] [Clang] Add [[clang::diagnose_specializations]] (PR #101469)

2024-08-01 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/101469 >From 82ab798fc72c6de64ae527d96393f0dc67307e98 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Thu, 1 Aug 2024 12:30:22 +0200 Subject: [PATCH 1/2] [Clang] Add [[clang::diagnose_specializations]] --- cl

[clang] [Clang] Add [[clang::diagnose_specializations]] (PR #101469)

2024-08-01 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/101469 >From 82ab798fc72c6de64ae527d96393f0dc67307e98 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Thu, 1 Aug 2024 12:30:22 +0200 Subject: [PATCH 1/3] [Clang] Add [[clang::diagnose_specializations]] --- cl

[clang] [Clang] Remove __is_nullptr (PR #99038)

2024-08-04 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/99038 >From fbc9ebb3900e69f2485111cfdc6b7a7dfd3e6ebe Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Tue, 16 Jul 2024 14:53:30 +0200 Subject: [PATCH 1/2] [Clang] Remove __is_nullptr --- clang/docs/LanguageExt

<    1   2   3   4   5   6   >