[libcxx] [libcxxabi] [libunwind] [llvm] [libc++] Enable -Wmissing-prototypes (PR #116261)

2024-12-27 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/116261 >From 4efe922727331e091d27c8eb3e2431d6349b1a40 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Thu, 14 Nov 2024 18:30:39 +0100 Subject: [PATCH] [libc++] Enable -Wmissing-prototypes --- libcxx/src/charc

[clang] [libcxx] [Clang] Add __builtin_common_reference (PR #121199)

2024-12-27 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/121199 None >From e0db7316b2705398a2ac7e69cd1e3e83ece52613 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Fri, 27 Sep 2024 22:11:14 +0200 Subject: [PATCH] [Clang] Add __builtin_common_reference --- clang/do

[clang] [clang-tools-extra] [libcxx] [llvm] [libc++] implement views::concat (PR #120920)

2024-12-24 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 requested changes to this pull request. Please make sure you're following the [libc++ Coding Guidelines](https://libcxx.llvm.org/CodingGuidelines.html). https://github.com/llvm/llvm-project/pull/120920 ___ cfe-commits mai

[libcxx] [libcxxabi] [libunwind] [llvm] [libc++] Enable -Wmissing-prototypes (PR #116261)

2025-02-03 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/116261 >From 0e74a8e32645d9b813e095e7cc17f092408ef12d Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Thu, 14 Nov 2024 18:30:39 +0100 Subject: [PATCH] [libc++] Enable -Wmissing-prototypes --- libcxx/include/f

[clang] [Clang] Fix __{add, remove}_pointer in Objective-C++ (PR #123678)

2025-01-30 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/123678 >From 3c1c9bf41d39d33123b33c5b131f7a0c0eb62581 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Tue, 21 Jan 2025 02:16:02 +0100 Subject: [PATCH] [Clang] Fix __{add,remove}_pointer in Objective-C++ --- c

[clang] [Clang] Fix __{add, remove}_pointer in Objective-C++ (PR #123678)

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

[clang] [Clang] Fix __{add, remove}_pointer in Objective-C++ (PR #123678)

2025-01-30 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: /cherry-pick 74d7f43b98910a110bc194752fca829eb19c265a https://github.com/llvm/llvm-project/pull/123678 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix __{add, remove}_pointer in Objective-C++ (PR #123678)

2025-01-30 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 milestoned https://github.com/llvm/llvm-project/pull/123678 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix __{add, remove}_pointer in Objective-C++ (PR #123678)

2025-01-30 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: /cherry-pick 74d7f43b98910a110bc194752fca829eb19c265a https://github.com/llvm/llvm-project/pull/123678 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add BuiltinTemplates.td to generate code for builtin templates (PR #123736)

2025-02-07 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/123736 >From 586dd4edfc79c88cc1583b64d186c1481fbd6ce1 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Wed, 4 Sep 2024 13:31:39 +0200 Subject: [PATCH 1/6] [Clang] Add BuiltinTemplates.td to generate code for bu

[clang] [Clang] Add BuiltinTemplates.td to generate code for builtin templates (PR #123736)

2025-02-07 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/123736 >From 586dd4edfc79c88cc1583b64d186c1481fbd6ce1 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Wed, 4 Sep 2024 13:31:39 +0200 Subject: [PATCH 1/5] [Clang] Add BuiltinTemplates.td to generate code for bu

[clang] [Clang] Remove __is_referenceable builtin (PR #123078)

2025-02-06 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 edited https://github.com/llvm/llvm-project/pull/123078 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Remove __is_referenceable builtin (PR #123078)

2025-02-06 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 edited https://github.com/llvm/llvm-project/pull/123078 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Remove __is_referenceable builtin (PR #123078)

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

[clang] [clang][bytecode] Implement __builtin_constant_p differently (PR #122099)

2025-02-12 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: > > Yes, that's the interesting question. Currently we assume that if > > __builtin_constant_p(__begin <= __ptr && __ptr < __end) is false, __ptr > > can't be within the the range [__begin, __ptr). > > Thinking about this some more, I'm not sure if this is even true. > `__bu

[clang] [Clang] Fix __{add, remove}_pointer in Objective-C++ (PR #123678)

2025-01-30 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: @AaronBallman is there anything blocking this? I'd really like to have this in the release branch as early as possible. https://github.com/llvm/llvm-project/pull/123678 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://

[clang] [Clang] Fix __{add, remove}_pointer in Objective-C++ (PR #123678)

2025-01-30 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/123678 >From 2fe753b803a1067872a3d61ca04cdf49b7c023a6 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Tue, 21 Jan 2025 02:16:02 +0100 Subject: [PATCH] [Clang] Fix __{add,remove}_pointer in Objective-C++ --- c

[clang] [clang-tools-extra] [flang] [clang] Extend diagnose_if to accept more detailed warning information, take 2 (PR #119712)

2024-12-12 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/119712 This is take two of #70976. This iteration of the patch makes sure that custom diagnostics without any warning group don't get promoted by `-Werror` or `-Wfatal-errors`. This implements parts of the extension

[clang] [clang-tools-extra] [flang] [clang] Extend diagnose_if to accept more detailed warning information, take 2 (PR #119712)

2024-12-12 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: @AaronBallman Your reproducer doesn't seem to work anymore in trunk (there's probably been another change?), so I couldn't test early diagnostics anymore. If you have another reproducer I'd be happy to add it. https://github.com/llvm/llvm-project/pull/119712 _

[clang] [libcxx] [Clang] Add __builtin_invoke (PR #116709)

2024-12-14 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 edited 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

[clang] [libcxx] [Clang] Add __builtin_invoke and use it in libc++ (PR #116709)

2024-12-14 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 edited 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

[clang] [libcxx] [Clang] Add __builtin_invoke and use it in libc++ (PR #116709)

2024-12-14 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 edited 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

[clang] [Clang][TableGen] Add missing __bf16 type to the builtins parser (PR #120662)

2024-12-19 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: Do you plan to use it somewhere? https://github.com/llvm/llvm-project/pull/120662 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [Clang] Add __builtin_invoke and use it in libc++ (PR #116709)

2024-12-20 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 edited 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

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

2024-11-22 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/7] [Clang] Add [[clang::diagnose_specializations]] --- cl

[clang] [libcxx] [Clang] Add __builtin_invoke and detect std::invoke as a builtin (PR #116709)

2024-11-22 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: > > 1. I'm not convinced the library part is true. The reality is that we > > support Clang and GCC, and if they both support the builtins (or provide > > different ones for the same feature) we remove our fallback implementations > > and thus reducing the complexity for libc

[clang] [libcxx] [Clang] Add __is_invocable_r and __is_nothrow_invocable_r (PR #81213)

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

[clang] [libcxx] [Clang] Add __builtin_invoke and detect std::invoke as a builtin (PR #116709)

2024-11-22 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: @ldionne I think this is the more appropriate place to discuss this. (From https://github.com/llvm/llvm-project/pull/116637#discussion_r1854114956) > Chris had a patch on Clang at some point where we discussed this and I voiced > concerns. Here it is: https://reviews.llvm.org

[libcxx] [libunwind] [llvm] [libc++] Enable -Wmissing-prototypes (PR #116261)

2024-11-17 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/116261 >From 811186764d1add4d83972db3ad0d2e7c96bb15a7 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Sat, 16 Nov 2024 19:23:20 +0100 Subject: [PATCH 1/2] [libc++] Fix a few problems found by clang-tidy --- l

[libcxx] [libcxxabi] [libunwind] [llvm] [libc++] Enable -Wmissing-prototypes (PR #116261)

2024-11-23 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/116261 >From e6f36baf39d1c3e2d90c3343c49771ccf1ca976c Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Thu, 14 Nov 2024 18:30:39 +0100 Subject: [PATCH] [libc++] Enable -Wmissing-prototypes --- libcxx/src/charc

[clang] [llvm] [Clang] Add __builtin_assume_dereferenceable to encode deref assumption. (PR #121789)

2025-01-08 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: Thanks, this is awesome! A non-constant version would be even more so :) https://github.com/llvm/llvm-project/pull/121789 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

[clang] [llvm] [Clang] Add __builtin_assume_dereferenceable to encode deref assumption. (PR #121789)

2025-01-08 Thread Nikolas Klauser via cfe-commits
@@ -839,6 +839,12 @@ def BuiltinAssumeAligned : Builtin { let Prototype = "void*(void const*, size_t, ...)"; } +def BuiltinAssumeDereferenceable : Builtin { + let Spellings = ["__builtin_assume_dereferenceable"]; + let Attributes = [NoThrow, Const, Constexpr];

[clang] [llvm] [Clang] Add __builtin_assume_dereferenceable to encode deref assumption. (PR #121789)

2025-01-08 Thread Nikolas Klauser via cfe-commits
@@ -839,6 +839,12 @@ def BuiltinAssumeAligned : Builtin { let Prototype = "void*(void const*, size_t, ...)"; } +def BuiltinAssumeDereferenceable : Builtin { + let Spellings = ["__builtin_assume_dereferenceable"]; + let Attributes = [NoThrow, Const, Constexpr];

[clang] [clang][bytecode] Implement __builtin_constant_p differently (PR #122099)

2025-01-08 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: Does this mean we should avoid `__builtin_constant_p` during constant evaluation when possible and instead add custom builtins in the few places we actually need the correct answer during constant evaluation? We currently use `__builtin_constant_p` in two different cases: - W

[clang] [llvm] [Clang] Add __builtin_assume_dereferenceable to encode deref assumption. (PR #121789)

2025-01-09 Thread Nikolas Klauser via cfe-commits
@@ -839,6 +839,12 @@ def BuiltinAssumeAligned : Builtin { let Prototype = "void*(void const*, size_t, ...)"; } +def BuiltinAssumeDereferenceable : Builtin { + let Spellings = ["__builtin_assume_dereferenceable"]; + let Attributes = [NoThrow, Const, Constexpr];

[clang] [Clang] Deprecate __is_referenceable (PR #123185)

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

[clang] [Clang] Fix __{add, remove}_pointer in Objective-C++ (PR #123678)

2025-01-20 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/123678 This aligns the builtins with how implementations work which don't use the buitins. >From 233d8d797a7a915d4100d7ca4259bb28611c7d90 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Tue, 21 Jan 2025 02:1

[clang] [Clang] Add BuiltinTemplates.td to generate code for builtin templates (PR #123736)

2025-01-21 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/123736 This makes it significantly easier to add new builtin templates, since you only have to modify two places instead of a dozen or so. The `BuiltinTemplates.td` could also be extended to generate documentation

[clang] [libcxx] [Clang] emit -Wignored-qualifiers diagnostic for cv-qualified base classes (PR #121419)

2025-01-21 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 approved this pull request. This makes me wonder how many other instances like this there are in the wild in generic code, but I guess compressed_pair-style classes aren't that ubiquitous. LGTM. https://github.com/llvm/llvm-project/pull/121419

[clang] [Clang] Add BuiltinTemplates.td to generate code for builtin templates (PR #123736)

2025-01-23 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/123736 >From 586dd4edfc79c88cc1583b64d186c1481fbd6ce1 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Wed, 4 Sep 2024 13:31:39 +0200 Subject: [PATCH] [Clang] Add BuiltinTemplates.td to generate code for builtin

[libcxx] [libcxxabi] [libunwind] [llvm] [libc++] Enable -Wmissing-prototypes (PR #116261)

2025-01-23 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/116261 >From 60f615f419e09714316678e465c4479bedb88506 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Thu, 14 Nov 2024 18:30:39 +0100 Subject: [PATCH] [libc++] Enable -Wmissing-prototypes --- libcxx/include/f

[clang] [clang-tools-extra] [flang] [clang] Extend diagnose_if to accept more detailed warning information, take 2 (PR #119712)

2025-01-24 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/119712 >From e2750ef68d3b6bbf879f0dd9eef8e4e4009eb3b6 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Thu, 12 Dec 2024 11:35:49 +0100 Subject: [PATCH] [clang] Extend diagnose_if to accept more detailed warning

[clang] [clang-tools-extra] [flang] [clang] Extend diagnose_if to accept more detailed warning information, take 2 (PR #119712)

2025-01-24 Thread Nikolas Klauser via cfe-commits
@@ -551,10 +547,12 @@ DiagnosticIDs::getDiagnosticSeverity(unsigned DiagID, SourceLocation Loc, // as well as disabling all messages which are currently mapped to Warning // (whether by default or downgraded from Error via e.g. -Wno-error or #pragma // diagnostic.) + /

[clang] [clang-tools-extra] [flang] [clang] Extend diagnose_if to accept more detailed warning information, take 2 (PR #119712)

2025-01-24 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 edited https://github.com/llvm/llvm-project/pull/119712 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [flang] [clang] Extend diagnose_if to accept more detailed warning information, take 2 (PR #119712)

2025-01-24 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 commented: > TBH I find it somewhat confusing to have a severity in `diagnose_if` and an > existing diagnostic group, which already has its own severity. Diagnostic groups don't have severity. Individual diagnostics have severity. This just exposes the same semant

[clang] [clang-tools-extra] [flang] [clang] Extend diagnose_if to accept more detailed warning information, take 2 (PR #119712)

2025-01-24 Thread Nikolas Klauser via cfe-commits
@@ -584,7 +582,9 @@ DiagnosticIDs::getDiagnosticSeverity(unsigned DiagID, SourceLocation Loc, const auto &SM = Diag.getSourceManager(); // Custom diagnostics always are emitted in system headers. philnik777 wrote: I don't think this comment adds much value

[clang] [Clang] Add BuiltinTemplates.td to generate code for builtin templates (PR #123736)

2025-01-25 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/123736 >From 586dd4edfc79c88cc1583b64d186c1481fbd6ce1 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Wed, 4 Sep 2024 13:31:39 +0200 Subject: [PATCH 1/4] [Clang] Add BuiltinTemplates.td to generate code for bu

[clang] [Clang] Add BuiltinTemplates.td to generate code for builtin templates (PR #123736)

2025-01-25 Thread Nikolas Klauser via cfe-commits
@@ -0,0 +1,23 @@ +//===--- BuiltinTemplates.td - Clang builtin template aliases ---*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang] [Clang] Add BuiltinTemplates.td to generate code for builtin templates (PR #123736)

2025-01-25 Thread Nikolas Klauser via cfe-commits
@@ -0,0 +1,184 @@ +//=- ClangBuiltinsEmitter.cpp - Generate Clang builtin templates-*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [Clang] Deprecate __is_referenceable (PR #123185)

2025-01-19 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 edited https://github.com/llvm/llvm-project/pull/123185 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-01-20 Thread Nikolas Klauser via cfe-commits
@@ -1212,6 +1212,14 @@ static void handlePreferredName(Sema &S, Decl *D, const ParsedAttr &AL) { << TT->getDecl(); } +static void handleNoSpecializations(Sema &S, Decl *D, const ParsedAttr &AL) { + StringRef Message; + if (AL.getNumArgs() != 0) +S.checkStringLit

[clang] [Clang] Document some of the implementation-defined keywords (PR #84591)

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

[libcxx] [libcxxabi] [libunwind] [llvm] [libc++] Enable -Wmissing-prototypes (PR #116261)

2025-01-27 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/116261 >From 8dfd58d01909d9b275a28afdac287a5c2e5423b8 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Thu, 14 Nov 2024 18:30:39 +0100 Subject: [PATCH] [libc++] Enable -Wmissing-prototypes --- libcxx/include/f

[clang] [clang-tools-extra] [flang] [clang] Extend diagnose_if to accept more detailed warning information, take 2 (PR #119712)

2025-01-28 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: > It looks like one of the header changes here is expensive, adding 0.5% to the > time to build clang. Per-file breakdown: > https://llvm-compile-time-tracker.com/compare_clang.php?from=aab25f20f6c06bab7aac6fb83d54705ec4cdfadd&to=0865ecc5150b9a55ba1f9e30b6d463a66ac362a6&stat=i

[clang] [clang-tools-extra] [flang] [clang] Extend diagnose_if to accept more detailed warning information, take 2 (PR #119712)

2025-01-27 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/119712 >From 0f1a11175bc7c3953e332159fe61192ad29e8c42 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Thu, 12 Dec 2024 11:35:49 +0100 Subject: [PATCH] [clang] Extend diagnose_if to accept more detailed warning

[clang] [Clang] Fix __{add, remove}_pointer in Objective-C++ (PR #123678)

2025-01-21 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/123678 >From 98395fdb573eadea53d7401eec9aac490de3678e Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Tue, 21 Jan 2025 02:16:02 +0100 Subject: [PATCH] [Clang] Fix __{add,remove}_pointer in Objective-C++ --- c

[clang] [clang] Fix `gnu::init_priority` attribute handling for reserved values (PR #121577)

2025-01-03 Thread Nikolas Klauser via cfe-commits
@@ -3324,6 +3324,9 @@ def err_attribute_argument_out_of_range : Error< def err_init_priority_object_attr : Error< "can only use 'init_priority' attribute on file-scope definitions " "of objects of class type">; +def warn_init_priority_reserved : Warning< + "requested 'init

[clang] [Clang] Make passing incomplete types to builtin type-traits a non-sfinae-friendly error (PR #121333)

2024-12-31 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 approved this pull request. I think this is the right direction, so LGTM, but maybe you want to wait for other people to comment before landing. https://github.com/llvm/llvm-project/pull/121333 ___ cfe-commits mailing lis

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

2024-12-21 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 closed 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] Deprecate __is_referenceable (PR #123185)

2025-01-16 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/123185 See #123078 >From c060b496d53002ce263ae43bd74153b2a89aca99 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Thu, 16 Jan 2025 12:19:03 +0100 Subject: [PATCH] [Clang] Deprecate __is_referenceable --- cl

[clang] [llvm] [Clang] Add __builtin_assume_dereferenceable to encode deref assumption. (PR #121789)

2025-01-08 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: Actually, how does this interact with ASan? e.g. would "I know there is enough storage to deref, but it may be poisoned by container annotations" be a valid use-case for this, or would we have to not annotate pointers in that case? https://github.com/llvm/llvm-project/pull/12

[clang] [clang] Fix `gnu::init_priority` attribute handling for reserved values (PR #121577)

2025-01-17 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: > > Allow values within the range 0-100 of init_priority to be used outside > > system library, but with a warning > > This was an intentional decision, not a bug or an oversight (I'm sorry, I > didn't see that @philnik777 had marked this a good first issue!). See #67673 > f

[clang] [clang] Fix `gnu::init_priority` attribute handling for reserved values (PR #121577)

2025-01-17 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: > > While this is a valid concern, I don't think it's much of a problem in > > reality. GCC just warns on this (not even an error by default) and I wasn't > > able to find a single use outside implementations of the reserved value > > range. > > I wouldn't expect to find use

[clang] [clang][bytecode] Implement __builtin_constant_p differently (PR #122099)

2025-01-09 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: > > We check which one is the currently active member of a union, and > > This is `__builtin_is_within_lifetime`, isn't it? I didn't realize that exists. I guess that is the correct builtin, yes. https://github.com/llvm/llvm-project/pull/122099 ___

[clang] [clang][bytecode] Implement __builtin_constant_p differently (PR #122099)

2025-01-09 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: > > * We check whether two pointers are in the same range > > > > Is that possible to implement in the interpreter without going back to AST > > visitors? > > I take "in the same range" meaning as "can be compared at compile time at > all" here, so yes, that would be rather

[clang] [Clang] Document some of the implementation-defined keywords (PR #84591)

2025-01-02 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/84591 >From c95d92ebfafa55ef7ded7464457776131bdd59d2 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Sat, 9 Mar 2024 02:14:36 +0100 Subject: [PATCH] [Clang] Document some of the implementation-defined keywords

[clang] [Clang] Document some of the implementation-defined keywords (PR #84591)

2025-01-02 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 commented: Sorry it took me so long to respond. I completely missed your review. https://github.com/llvm/llvm-project/pull/84591 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

[clang] [Clang] Document some of the implementation-defined keywords (PR #84591)

2025-01-02 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 edited https://github.com/llvm/llvm-project/pull/84591 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Document some of the implementation-defined keywords (PR #84591)

2025-01-02 Thread Nikolas Klauser via cfe-commits
@@ -433,6 +433,117 @@ __datasizeof ``__datasizeof`` behaves like ``sizeof``, except that it returns the size of the type ignoring tail padding. +_BitInt, _ExtInt + + +Clang supports the C23 ``_BitInt(N)`` feature as an extension in older C modes +and in C++. T

[clang] [Clang] Document some of the implementation-defined keywords (PR #84591)

2025-01-02 Thread Nikolas Klauser via cfe-commits
@@ -433,6 +433,117 @@ __datasizeof ``__datasizeof`` behaves like ``sizeof``, except that it returns the size of the type ignoring tail padding. +_BitInt, _ExtInt + + +Clang supports the C23 ``_BitInt(N)`` feature as an extension in older C modes +and in C++. T

[clang] [Clang] Document some of the implementation-defined keywords (PR #84591)

2025-01-02 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/84591 >From 56167d0e07c0d676aaae796f18af6f7f1f1c1076 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Sat, 9 Mar 2024 02:14:36 +0100 Subject: [PATCH] [Clang] Document some of the implementation-defined keywords

[clang] [Clang] Remove __is_referenceable builtin (PR #123078)

2025-01-15 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/123078 `__is_referenceable` is almost unused in the wild, and the few cases I was able to find had checks around them. Since The places in the standard library where `__is_referenceable` is used have bespoke builti

[clang] [Clang] Document some of the implementation-defined keywords (PR #84591)

2025-01-15 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/84591 >From 46f59109c0f4902e798195128855345347ac128c Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Sat, 9 Mar 2024 02:14:36 +0100 Subject: [PATCH] [Clang] Document some of the implementation-defined keywords

[clang] [Clang] Remove __is_referenceable builtin (PR #123078)

2025-01-15 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: > Should we deprecate it in 20, remove in 21? _almost_ is not 0 > https://github.com/search?q=__is_referenceable%28&type=code What exactly would you like to do? Make `__has_builtin(__is_referenceable)` return 0 but still accept `__is_referenceable` for a release? https://git

[clang] [Docs] Document freestanding requirements (PR #132232)

2025-03-25 Thread Nikolas Klauser via cfe-commits
@@ -534,11 +534,6 @@ C23 implementation status Clang 16 - - String functions for freestanding implementations - https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2524.htm";>N2524 - No - philnik777 wrote: FWIW we list all

[clang] [llvm] Revert "Enable unnecessary-virtual-specifier by default" (PR #134105)

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

[clang] [Docs] Document freestanding requirements (PR #132232)

2025-04-05 Thread Nikolas Klauser via cfe-commits
@@ -534,11 +534,6 @@ C23 implementation status Clang 16 - - String functions for freestanding implementations - https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2524.htm";>N2524 - No - philnik777 wrote: Hmm, yeah. I gues

[clang] [llvm] Enable unnecessary-virtual-specifier by default (PR #133265)

2025-04-05 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: @DKLoehr @AaronBallman Did you see the revert? https://github.com/llvm/llvm-project/pull/133265 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libcxx] [libcxxabi] [libunwind] [llvm] [libc++] Enable -Wmissing-prototypes (PR #116261)

2025-03-27 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/116261 >From 3f3478d6708cbea9a68cac31d51e062bbe126ef8 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Thu, 14 Nov 2024 18:30:39 +0100 Subject: [PATCH] [libc++] Enable -Wmissing-prototypes --- libcxx/include/f

[clang] [Clang] Make enums trivially equality comparable (PR #133587)

2025-04-10 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: > The summary should not merely link to an issue but describe the problem as > well. Two reasons: > > 1. for folks reading this in git log > > 2. The issue may not totally explain what is going on. > > > I actually did not get it at first b/c the issue talks about _

[clang] [libcxx] [Clang] Add __builtin_invoke and use it in libc++ (PR #116709)

2025-04-08 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/116709 >From 613ef41a6e3bfa3a24e45ce7761918639143cf82 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Tue, 1 Oct 2024 11:08:02 +0200 Subject: [PATCH] [Clang] Add __builtin_invoke and recognize std::invoke as a

[clang] [Clang] Make enums trivially equality comparable (PR #133587)

2025-03-30 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 ready_for_review https://github.com/llvm/llvm-project/pull/133587 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Fix builtin_memcmp buffer sizes for pointers (PR #130570)

2025-03-15 Thread Nikolas Klauser via cfe-commits
@@ -0,0 +1,120 @@ +// RUN: %clang_cc1 -std=c++2c -fexperimental-new-constant-interpreter -verify=expected,both %s +// RUN: %clang_cc1 -std=c++2c -verify=ref,both %s + +// both-no-diagnostics + +namespace std { +inline namespace { philnik777 wrote: I'm just wond

[clang] [Clang] Allow simpler visibility annotations when targeting win32 and mingw (PR #133699)

2025-04-11 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 ready_for_review 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

[clang] [libcxx] [Clang] Add __builtin_common_reference (PR #121199)

2025-04-11 Thread Nikolas Klauser via cfe-commits
@@ -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

[clang] [libcxx] [Clang] Add __builtin_common_reference (PR #121199)

2025-04-11 Thread Nikolas Klauser via cfe-commits
@@ -145,8 +160,6 @@ struct __common_reference_sub_bullet1<_Tp, _Up> { philnik777 wrote: I've added one. https://github.com/llvm/llvm-project/pull/121199 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:/

[clang] [libcxx] [Clang] Add __builtin_common_reference (PR #121199)

2025-04-11 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/121199 >From 273d0e6149a8326284ec1e385e83c8728c41ff68 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Fri, 27 Sep 2024 22:11:14 +0200 Subject: [PATCH] [Clang] Add __builtin_common_reference --- clang/docs/Lan

[clang] [libcxx] [Clang] Add __builtin_common_reference (PR #121199)

2025-04-11 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/121199 >From 97d6d6918126493fc8c09d9f3af472d701cb2cf9 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Fri, 27 Sep 2024 22:11:14 +0200 Subject: [PATCH] [Clang] Add __builtin_common_reference --- clang/docs/Lan

[clang] [C] Diagnose use of C++ keywords in C (PR #137234)

2025-04-24 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: Maybe `-Wkeyword-in-c++` or `-Wc++-keyword` would be a more concise name for the group? https://github.com/llvm/llvm-project/pull/137234 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[clang] [C] Diagnose use of C++ keywords in C (PR #137234)

2025-04-24 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: > > Maybe `-Wkeyword-in-c++` or `-Wc++-keyword` would be a more concise name > > for the group? > > I'm not tied to the name I picked, so either of these is fine by me. GCC > doesn't split this into its own warning group, so we've got some latitude. > > Any strong preference

[clang] [Clang] Allow simpler visibility annotations when targeting win32 and mingw (PR #133699)

2025-04-14 Thread Nikolas Klauser via cfe-commits
@@ -870,7 +873,8 @@ def NSReturnsMismatch : DiagGroup<"nsreturns-mismatch">; def IndependentClassAttribute : DiagGroup<"IndependentClass-attribute">; def UnknownAttributes : DiagGroup<"unknown-attributes">; -def IgnoredAttributes : DiagGroup<"ignored-attributes">; +def Ignored

[libcxx] [libunwind] [llvm] [libc++] Upgrade to GCC 15 (PR #138293)

2025-05-06 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/138293 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,san

[libcxx] [libunwind] [llvm] [libc++] Upgrade to GCC 15 (PR #138293)

2025-05-06 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/138293 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,san

[libcxx] [libunwind] [llvm] [libc++] Upgrade to GCC 15 (PR #138293)

2025-05-06 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/138293 >From 205744331346ec8fbfc5fc5cfea178c3eb446da2 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

[clang] [llvm] Add unnecessary-virtual-specifier to -Wextra (PR #138741)

2025-05-06 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: This should probably work. To make sure you can make a simple change in the `libcxx/` subdirectory to trigger the libc++ pre-commit CI (which should of course be removed again before actually committing). https://github.com/llvm/llvm-project/pull/138741 __

[clang] clang-format: Add -disable-format option (PR #137617)

2025-04-29 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: > > Can't you just run the `llvm-include-order` clang-tidy check instead? > > Does that take `IncludeBlocks` and `IncludeCategories` from `.clang-format` > into account? I don't think so, but it shouldn't be impossible to teach clang-tidy. https://github.com/llvm/llvm-projec

[clang] clang-format: Add -disable-format option (PR #137617)

2025-04-29 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: Can't you just run the `llvm-include-order` clang-tidy check instead? https://github.com/llvm/llvm-project/pull/137617 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Allow simpler visibility annotations when targeting win32 and mingw (PR #133699)

2025-05-02 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 edited 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

[clang] [Clang] Allow simpler visibility annotations when targeting win32 and mingw (PR #133699)

2025-05-02 Thread Nikolas Klauser via cfe-commits
@@ -4185,6 +4185,14 @@ def DLLExport : InheritableAttr, TargetSpecificAttr { let Documentation = [DLLExportDocs]; } +def DLLExportOnDecl : InheritableAttr, TargetSpecificAttr { philnik777 wrote: Since we don't represent invalid attribute in the AST curren

[clang] [Clang] Allow simpler visibility annotations when targeting win32 and mingw (PR #133699)

2025-05-02 Thread Nikolas Klauser via cfe-commits
@@ -6606,7 +6606,10 @@ void Sema::checkClassLevelDLLAttribute(CXXRecordDecl *Class) { if (ClassExported && !ClassAttr->isInherited() && TSK == TSK_ExplicitInstantiationDeclaration && !Context.getTargetInfo().getTriple().isWindowsGNUEnvironment()) { -Class->dr

<    1   2   3   4   5   6   7   >