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

2024-02-08 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/81213 >From 8657d0de76373665c55b774b9cdffe9707288efc Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Mon, 11 Sep 2023 04:31:02 +0200 Subject: [PATCH] [Clang] Add __is_invocable_r and __is_nothrow_invocable_r

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

2024-02-08 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/81213 >From f2394044b0397cbe3bd15f96f43fbf0e50def206 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Mon, 11 Sep 2023 04:31:02 +0200 Subject: [PATCH] [Clang] Add __is_invocable_r and __is_nothrow_invocable_r

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

2024-02-08 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/81213 This patch also uses the new builtins in libc++. >From 6c74eb263dd889858f3f7be328d85fe354f71835 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Mon, 11 Sep 2023 04:31:02 +0200 Subject: [PATCH] [Clang]

[clang] [Clang] Allow __is_nothrow_convertible to be used as an identifier (PR #80476)

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

[clang] [libcxx] [Clang][libc++] Implement __is_nothrow_convertible and use it in libc++ (PR #80436)

2024-02-02 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: @sdkrystian #80476 https://github.com/llvm/llvm-project/pull/80436 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Allow __is_nothrow_convertible to be used as an identifier (PR #80476)

2024-02-02 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/80476 `__is_nothrow_convertible` has been used by libstdc++ previously as an identifier. >From fb4160b50535fd16951c5261e6c7d91da0cd92b0 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Fri, 2 Feb 2024

[libcxx] [clang] [Clang][libc++] Implement __is_nothrow_convertible and use it in libc++ (PR #80436)

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

[libcxx] [clang] [Clang][libc++] Implement __is_nothrow_convertible and use it in libc++ (PR #80436)

2024-02-02 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/80436 >From d210ffcbc1c60c222bd456851372f4835cc12127 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Fri, 2 Feb 2024 15:12:15 +0100 Subject: [PATCH] [Clang][libc++] Implement __is_nothrow_convertible and use

[libcxx] [clang] [Clang][libc++] Implement __is_nothrow_convertible and use it in libc++ (PR #80436)

2024-02-02 Thread Nikolas Klauser via cfe-commits
@@ -567,6 +567,7 @@ TYPE_TRAIT_1(__is_unsigned, IsUnsigned, KEYCXX) // Embarcadero Binary Type Traits TYPE_TRAIT_2(__is_same, IsSame, KEYCXX) TYPE_TRAIT_2(__is_convertible, IsConvertible, KEYCXX) +TYPE_TRAIT_2(__is_nothrow_convertible, IsNothrowConvertible, KEYCXX)

[clang] [libcxx] [Clang][libc++] Implement __is_nothrow_convertible and use it in libc++ (PR #80436)

2024-02-02 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/80436 GCC 13 has implemented this builtin. >From dc3aafe0e3bd2e20121440efd8efa86263bd6b4b Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Fri, 2 Feb 2024 15:12:15 +0100 Subject: [PATCH] [Clang][libc++]

[clang] [clang] Fix crash when declaring invalid lambda member (PR #74110)

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

[libc] [libcxx] [lld] [llvm] [clang] [flang] [libcxxabi] [openmp] [compiler-rt] [mlir] [lldb] [clang-tools-extra] [libc++][memory] P2652R2: Disallow Specialization of `allocator_traits` (PR #79978)

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

[compiler-rt] [flang] [libcxxabi] [lldb] [clang-tools-extra] [openmp] [lld] [libcxx] [mlir] [llvm] [libc] [clang] [libc++][memory] P2652R2: Disallow Specialization of `allocator_traits` (PR #79978)

2024-02-01 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 approved this pull request. Thanks! LGTM. https://github.com/llvm/llvm-project/pull/79978 ___ 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-01-31 Thread Nikolas Klauser via cfe-commits
@@ -1526,10 +1526,9 @@ bool CXXRecordDecl::isGenericLambda() const { #ifndef NDEBUG static bool allLookupResultsAreTheSame(const DeclContext::lookup_result ) { - for (auto *D : R) -if (!declaresSameEntity(D, R.front())) - return false; - return true; + return

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

2024-01-31 Thread Nikolas Klauser via cfe-commits
@@ -1455,39 +1455,44 @@ More information could be found `here Language Extensions Back-ported to Previous Standards = -==

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

2024-01-31 Thread Nikolas Klauser via cfe-commits
@@ -58,16 +58,10 @@ class Class2 : public Class1 { #pragma omp declare reduction(fun1 : long : omp_out += omp_in) initializer // expected-error {{expected '(' after 'initializer'}} #pragma omp declare reduction(fun2 : long : omp_out += omp_in)

[flang] [compiler-rt] [libcxx] [clang-tools-extra] [lld] [libc] [clang] [llvm] [libc++][memory] P2652R2: Disallow Specialization of `allocator_traits` (PR #79978)

2024-01-31 Thread Nikolas Klauser via cfe-commits
@@ -88,9 +88,9 @@ def add_version_header(tc): { "name": "__cpp_lib_allocate_at_least", "values": { -"c++23": 202106, +# "c++23": 202106, # P0401R6 Providing size feedback in the Allocator interface

[lld] [llvm] [clang-tools-extra] [libcxx] [libc] [flang] [compiler-rt] [clang] [libc++][memory] P2652R2: Disallow Specialization of `allocator_traits` (PR #79978)

2024-01-31 Thread Nikolas Klauser via cfe-commits
@@ -0,0 +1,34 @@ +//===--===// +// +// 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:

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

2024-01-30 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: ping 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] Add support for builtin_verbose_trap (PR #79230)

2024-01-26 Thread Nikolas Klauser via cfe-commits
@@ -0,0 +1,28 @@ +// RUN: %clang_cc1 -std=c++11 -fsyntax-only -fcxx-exceptions -verify %s + +#if !__has_builtin(__builtin_verbose_trap) +#error +#endif + +constexpr char const* constMsg1 = "hello"; +char const* const constMsg2 = "hello"; +char const constMsg3[] = "hello"; +

[clang] [clang] Merge some delarations which currently have different attributes (PR #79349)

2024-01-24 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/79349 None >From f65bd5f45cf24369a56a4cf4c556c57791d0bf3b Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Wed, 11 Oct 2023 13:02:30 +0200 Subject: [PATCH] [clang] Merge some delarations which currently have

[llvm] [clang] [clang-tools-extra] [clang] Refactor Builtins.def to be a tablegen file (PR #68324)

2024-01-24 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: @mikaelholmen Thanks. I've fixed the signature in e099e7b. https://github.com/llvm/llvm-project/pull/68324 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] e099e7b - [Clang] Fix the signature of __builtin___stpncpy_chk

2024-01-24 Thread Nikolas Klauser via cfe-commits
Author: Nikolas Klauser Date: 2024-01-24T19:25:01+01:00 New Revision: e099e7b278c774338c7019e38fbbca9ef2c8dd74 URL: https://github.com/llvm/llvm-project/commit/e099e7b278c774338c7019e38fbbca9ef2c8dd74 DIFF:

[clang] [llvm] [clang-tools-extra] [clang] Refactor Builtins.def to be a tablegen file (PR #68324)

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

[clang] [clang] Document the type_visibility attribute (PR #79157)

2024-01-23 Thread Nikolas Klauser via cfe-commits
@@ -5557,6 +5557,21 @@ See :doc:`LTOVisibility`. }]; } +def TypeVisibilityDocs : Documentation { + let Category = DocCatType; + let Content = [{ +The ``type_visibility`` attribute allows the ELF visibility of a type and its vague +linkage objects (vtable, typeinfo,

[clang] [libcxx] CI Test - Please ignore (PR #78712)

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

[clang] [libcxx] CI Test - Please ignore (PR #78712)

2024-01-19 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/78712 >From 1c17da188035ec39c23c62f9f467cfbee05f4f63 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Fri, 19 Jan 2024 14:40:38 +0100 Subject: [PATCH] CI Test - Please ignore ---

[clang] CI Test - Please ignore (PR #78712)

2024-01-19 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/78712 >From 5949270c8eaf01777e0b09222bac03aaa3ca57b2 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Fri, 19 Jan 2024 14:40:38 +0100 Subject: [PATCH] CI Test - Please ignore ---

[clang] CI Test - Please ignore (PR #78712)

2024-01-19 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/78712 >From be9fcddbdb01827544a7159673781263a41d31ad Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Fri, 19 Jan 2024 14:40:38 +0100 Subject: [PATCH] CI Test - Please ignore ---

[clang] CI Test - Please ignore (PR #78712)

2024-01-19 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/78712 None >From e502c00bd9f1606c82507cb1684328d187523110 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Fri, 19 Jan 2024 14:40:38 +0100 Subject: [PATCH] CI Test - Please ignore ---

[llvm] [libcxx] [clang] [clang-tools-extra] [lldb] [libc] [libcxxabi] [libc++] Fix the behavior of throwing `operator new` under -fno-exceptions (PR #69498)

2024-01-18 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 approved this pull request. https://github.com/llvm/llvm-project/pull/69498 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libcxxabi] [clang] [lldb] [libc] [clang-tools-extra] [llvm] [libcxx] [libc++] Fix the behavior of throwing `operator new` under -fno-exceptions (PR #69498)

2024-01-18 Thread Nikolas Klauser via cfe-commits
@@ -7,6 +7,8 @@ //===--===// #include <__memory/aligned_alloc.h> +#include <__overridable_function> philnik777 wrote: We already have `#include "include/refstring.h" // from libc++` inside

[clang-tools-extra] [lldb] [libcxx] [llvm] [libcxxabi] [clang] [libc] [libc++] Fix the behavior of throwing `operator new` under -fno-exceptions (PR #69498)

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

[llvm] [libcxx] [clang] [clang-tools-extra] [lldb] [libc] [libcxxabi] [libc++] Fix the behavior of throwing `operator new` under -fno-exceptions (PR #69498)

2024-01-18 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 commented: LGTM % nit. https://github.com/llvm/llvm-project/pull/69498 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [llvm] [clang] Refactor Builtins.def to be a tablegen file (PR #68324)

2024-01-18 Thread Nikolas Klauser via cfe-commits
@@ -6571,11 +6571,14 @@ class AtomicExpr : public Expr { /// \return empty atomic scope model if the atomic op code does not have /// scope operand. static std::unique_ptr getScopeModel(AtomicOp Op) { -if (Op >= AO__opencl_atomic_load && Op <=

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

2024-01-18 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: gentle ping 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] Fix crash when declaring invalid lambda member (PR #74110)

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

[llvm] [clang] [clang-tools-extra] [clang] Refactor Builtins.def to be a tablegen file (PR #68324)

2024-01-17 Thread Nikolas Klauser via cfe-commits
@@ -6571,11 +6571,14 @@ class AtomicExpr : public Expr { /// \return empty atomic scope model if the atomic op code does not have /// scope operand. static std::unique_ptr getScopeModel(AtomicOp Op) { -if (Op >= AO__opencl_atomic_load && Op <=

[clang] [clang] Refactor Builtins.def to be a tablegen file (PR #68324)

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

[clang] [CUDA][HIP] warn incompatible redeclare (PR #77359)

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

[clang] [CUDA][HIP] warn incompatible redeclare (PR #77359)

2024-01-16 Thread Nikolas Klauser via cfe-commits
@@ -0,0 +1,19 @@ +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fsyntax-only \ +// RUN: -isystem %S/Inputs -verify %s +// RUN: %clang_cc1 -triple nvptx64-nvidia-cuda -fsyntax-only \ +// RUN: -isystem %S/Inputs -fcuda-is-device -verify %s +// RUN: %clang_cc1 -triple

[clang] [libcxx] [mlir] [llvm] [lld] [compiler-rt] [clang-tools-extra] [flang] [lldb] [libc++][numeric] P0543R3: Saturation arithmetic (PR #77967)

2024-01-14 Thread Nikolas Klauser via cfe-commits
@@ -0,0 +1,119 @@ +// -*- C++ -*- +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +//

[flang] [clang-tools-extra] [lld] [clang] [libcxx] [lldb] [compiler-rt] [mlir] [llvm] [libc++][numeric] P0543R3: Saturation arithmetic (PR #77967)

2024-01-14 Thread Nikolas Klauser via cfe-commits
@@ -0,0 +1,130 @@ +//===--===// +// +// 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:

[lldb] [clang-tools-extra] [lld] [compiler-rt] [mlir] [llvm] [flang] [clang] [libcxx] [libc++][numeric] P0543R3: Saturation arithmetic (PR #77967)

2024-01-14 Thread Nikolas Klauser via cfe-commits
@@ -0,0 +1,119 @@ +// -*- C++ -*- +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +//

[mlir] [clang-tools-extra] [lld] [clang] [libcxx] [flang] [compiler-rt] [llvm] [lldb] [libc++][numeric] P0543R3: Saturation arithmetic (PR #77967)

2024-01-14 Thread Nikolas Klauser via cfe-commits
@@ -0,0 +1,119 @@ +// -*- C++ -*- +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +//

[clang] [clang] Add `clang::behaves_like_std(...)` attribute (PR #76596)

2024-01-13 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: It's not ready, but I have a draft for a much more general attribute: #78071 https://github.com/llvm/llvm-project/pull/76596 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] Add attribute [[clang::builtin]] (PR #78071)

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

[clang] [clang] Add add attribute [[clang::builtin]] (PR #78071)

2024-01-13 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/78071 None >From f073a827ddbe728ced53a82431f517da58753776 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Mon, 11 Dec 2023 12:51:07 +0100 Subject: [PATCH] [clang] Add add attribute [[clang::builtin]] ---

[lld] [mlir] [clang] [libcxx] [openmp] [llvm] [libc++] Deprecate the _LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS macro (PR #77692)

2024-01-12 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: > My suggestion on #69994 had been to stop implying > `_LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS` from > `_LIBCPP_ENABLE_CXX20_REMOVED_FEATURES` in LLVM 18 at the same time as > deprecating it. Did you intend to _not_ do that, or was it just missed? We've also

[clang-tools-extra] [mlir] [libcxxabi] [compiler-rt] [clang] [flang] [llvm] [libc] [libcxx] [openmp] [clang] Avoid -Wshadow warning when init-capture named same as class field (PR #74512)

2024-01-11 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: > @philnik777 I agree strongly with @Fznamznon. If `this` is not captured there > is no actual shadowing in that they do not occupy encompassing scope, and so > removing one declaration would not give you access to the other variable. I don't disagree that this is

[clang] [Clang][C++26] Implement Pack Indexing (P2662R3). (PR #72644)

2024-01-10 Thread Nikolas Klauser via cfe-commits
@@ -978,6 +978,20 @@ bool Parser::ConsumeAndStoreFunctionPrologue(CachedTokens ) { } else { break; } + // Pack indexing + if (getLangOpts().CPlusPlus26 && Tok.is(tok::ellipsis) && philnik777 wrote: > @philnik777 This would

[clang] [Clang][C++26] Implement Pack Indexing (P2662R3). (PR #72644)

2024-01-10 Thread Nikolas Klauser via cfe-commits
@@ -978,6 +978,20 @@ bool Parser::ConsumeAndStoreFunctionPrologue(CachedTokens ) { } else { break; } + // Pack indexing + if (getLangOpts().CPlusPlus26 && Tok.is(tok::ellipsis) && philnik777 wrote: FWIW it would be really sweet

[clang] [clang][NFC] Refactor Builtins.def to be a tablegen file (PR #68324)

2024-01-06 Thread Nikolas Klauser via cfe-commits
@@ -0,0 +1,333 @@ +//=- ClangDiagnosticsEmitter.cpp - Generate Clang diagnostics tables -*- 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:

[clang] [llvm] [libcxx] "Reapply "[Sema] Fix crash on invalid code with parenthesized aggrega… (PR #76833)

2024-01-06 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: @mordante The lines could be changed to `// expected-error-re@*:* 0-1 (excess elements in struct initializer|no matching constructor for initialization of)}}{{.*` to still have coverage. FWIW the `{{.*}}` at the end seems to be redundant too.

[lldb] [libunwind] [libcxx] [llvm] [libc] [compiler-rt] [clang-tools-extra] [flang] [clang] [libc++] Implement ranges::iota (PR #68494)

2024-01-05 Thread Nikolas Klauser via cfe-commits
@@ -0,0 +1,123 @@ +//===--===// +// +// 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:

[compiler-rt] [clang] [flang] [libunwind] [libc] [clang-tools-extra] [llvm] [libcxx] [lldb] [libc++] Implement ranges::iota (PR #68494)

2024-01-05 Thread Nikolas Klauser via cfe-commits
@@ -13,7 +13,7 @@ // Range algorithms should return `std::ranges::dangling` when given a dangling range. philnik777 wrote: The formatting changes in here are nice, but would be better handled in a separate PR, just to make it clear what actually changed.

[clang-tools-extra] [libcxx] [libunwind] [lldb] [clang] [compiler-rt] [libc] [flang] [llvm] [libc++] Implement ranges::iota (PR #68494)

2024-01-05 Thread Nikolas Klauser via cfe-commits
@@ -0,0 +1,123 @@ +//===--===// +// +// 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:

[clang] [compiler-rt] [libunwind] [flang] [llvm] [libcxx] [libc] [lldb] [clang-tools-extra] [libc++] Implement ranges::iota (PR #68494)

2024-01-05 Thread Nikolas Klauser via cfe-commits
@@ -0,0 +1,123 @@ +//===--===// +// +// 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:

[libunwind] [libc] [compiler-rt] [llvm] [clang] [lldb] [clang-tools-extra] [flang] [libcxx] [libc++] Implement ranges::iota (PR #68494)

2024-01-05 Thread Nikolas Klauser via cfe-commits
@@ -46,7 +46,7 @@ "`P2255R2 `__","LWG","A type trait to detect reference binding to temporary","February 2022","","" "`P2273R3 `__","LWG","Making ``std::unique_ptr`` constexpr","February 2022","|Complete|","16.0"

[compiler-rt] [clang] [libc] [llvm] [libcxx] [clang-tools-extra] [lldb] [flang] [libunwind] [libc++] Implement ranges::iota (PR #68494)

2024-01-05 Thread Nikolas Klauser via cfe-commits
@@ -0,0 +1,123 @@ +//===--===// +// +// 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:

[clang] [clang-tools-extra] [libunwind] [lldb] [libc] [compiler-rt] [libcxx] [flang] [llvm] [libc++] Implement ranges::iota (PR #68494)

2024-01-05 Thread Nikolas Klauser via cfe-commits
@@ -0,0 +1,123 @@ +//===--===// +// +// 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:

[clang] [flang] [lld] [compiler-rt] [llvm] [clang-tools-extra] [libcxx] [libc++][ranges] P2116R9: Implements `views::enumerate` (PR #73617)

2024-01-03 Thread Nikolas Klauser via cfe-commits
@@ -0,0 +1,333 @@ +// -*- C++ -*- +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +//

[libcxx] [lld] [compiler-rt] [llvm] [flang] [clang-tools-extra] [clang] [libc++][ranges] P2116R9: Implements `views::enumerate` (PR #73617)

2024-01-03 Thread Nikolas Klauser via cfe-commits
@@ -0,0 +1,333 @@ +// -*- C++ -*- +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +//

[llvm] [clang-tools-extra] [lld] [libcxx] [clang] [flang] [compiler-rt] [libc++][ranges] P2116R9: Implements `views::enumerate` (PR #73617)

2024-01-03 Thread Nikolas Klauser via cfe-commits
@@ -0,0 +1,333 @@ +// -*- C++ -*- +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +//

[llvm] [compiler-rt] [libcxx] [libc] [openmp] [lldb] [mlir] [clang] [flang] [clang-tools-extra] [libc++][span] P2821R5: `span.at()` (PR #74994)

2024-01-01 Thread Nikolas Klauser via cfe-commits
@@ -0,0 +1,136 @@ +//===--===// +// +// 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:

[clang] [lldb] [flang] [libcxx] [openmp] [llvm] [compiler-rt] [clang-tools-extra] [mlir] [libc] [libc++][span] P2821R5: `span.at()` (PR #74994)

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

[compiler-rt] [clang] [libcxx] [lldb] [mlir] [llvm] [libc] [openmp] [flang] [clang-tools-extra] [libc++][span] P2821R5: `span.at()` (PR #74994)

2024-01-01 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 approved this pull request. Other than the test this LGTM. https://github.com/llvm/llvm-project/pull/74994 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] Add `clang::behaves_like_std(...)` attribute (PR #76596)

2023-12-31 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: > @philnik777 Do `std::move`/ `std::forward` etc actually need an abi tag? > Maybe we should simply not set a tag given that clang / gcc replace call to > these functions. If that were always the case we could simply provide a declaration without ever defining the function,

[clang] [clang] Add `clang::behaves_like_std(...)` attribute (PR #76596)

2023-12-30 Thread Nikolas Klauser via cfe-commits
@@ -0,0 +1,20 @@ +// RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify %s + +namespace mystd { +inline namespace bar { +template struct remove_reference { typedef T type; }; +template struct remove_reference { typedef T type; }; +template struct remove_reference { typedef T

[clang] [clang] Add `clang::behaves_like_std(...)` attribute (PR #76596)

2023-12-30 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 edited https://github.com/llvm/llvm-project/pull/76596 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add `clang::behaves_like_std(...)` attribute (PR #76596)

2023-12-30 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 commented: While I disagree with the reasoning for not just using `std` (@MaxEW707 I think having a chat about this informally would be nice.), I do think it makes sense to add the ability to declare some functions as builtins. There are a few cases inside the

[clang] [Clang][Builtin] add __builtin_exit (PR #74803)

2023-12-21 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: I'm not really convinced that `__builtin_exit` is widely used. If you filter for C/C++ and exclude GCC there aren't many matches: https://sourcegraph.com/search?q=context:global+__builtin_exit+count:all+-file:gcc/.*+%28lang:C+OR+lang:C%2B%2B%29=standard=0=repo

[libcxx] [mlir] [lld] [lldb] [compiler-rt] [llvm] [clang] [clang-tools-extra] [libc++][ranges] Implement ranges::contains_subrange (PR #66963)

2023-12-18 Thread Nikolas Klauser via cfe-commits
@@ -0,0 +1,145 @@ +//===--===// +// +// 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:

[libcxx] [compiler-rt] [clang-tools-extra] [lldb] [mlir] [llvm] [lld] [clang] [libc++][ranges] Implement ranges::contains_subrange (PR #66963)

2023-12-18 Thread Nikolas Klauser via cfe-commits
@@ -0,0 +1,145 @@ +//===--===// +// +// 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:

[openmp] [lldb] [mlir] [clang] [flang] [libcxx] [libc] [compiler-rt] [llvm] [clang-tools-extra] [libc++][span] P2821R5: span.at() (PR #74994)

2023-12-18 Thread Nikolas Klauser via cfe-commits
@@ -0,0 +1,136 @@ +//===--===// +// +// 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:

[clang] [WIP][libc++] Add builtin to clear padding bytes (prework for P0528R3) (PR #75371)

2023-12-13 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: I don't think this should be tagged as libc++, since it doesn't actually touch anything of libc++. https://github.com/llvm/llvm-project/pull/75371 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Clang][docs] Update extension documentation (PR #75150)

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

[clang] [Clang][docs] Update extension documentation (PR #75150)

2023-12-12 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: I'm landing this, since this shouldn't be in any way controversial. https://github.com/llvm/llvm-project/pull/75150 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][docs] Update extension documentation (PR #75150)

2023-12-12 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/75150 This is back-ported to C++03 now, since clang accepts C++11 attributes in C++03. https://godbolt.org/z/f7xG18bdE >From fbc41ef81ff8d4b647f45dfbeca20d4428ce0c98 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser

[clang] [Clang] Allow the use of consecutive brackets as an extension in C++03 (PR #75148)

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

[clang] [Clang] Allow the use of consecutive brackets as an extension in C++03 (PR #75148)

2023-12-12 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/75148 None >From be2654702d4e7bc3b8689662db6011a3e148ef4d Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Tue, 12 Dec 2023 08:47:26 +0100 Subject: [PATCH] [Clang] Allow the use of consecutive brackets as an

[flang] [clang-tools-extra] [compiler-rt] [libcxxabi] [openmp] [libcxx] [clang] [mlir] [libc] [llvm] [clang] Avoid -Wshadow warning when init-capture named same as class field (PR #74512)

2023-12-11 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: I seem to be the only one, but I don't understand how this isn't shadowing. The whole point of the shadowing warning is to avoid confusion about which variable is actually used, which IMO could very well be the case here. I think it would be much better to get a new flag to

[llvm] [clang-tools-extra] [libcxx] [clang] [libc++][span] P2821R5: span.at() (PR #74994)

2023-12-10 Thread Nikolas Klauser via cfe-commits
@@ -0,0 +1,136 @@ +//===--===// +// +// 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:

[libcxx] [clang] [llvm] [clang-tools-extra] [libc++][span] P2821R5: span.at() (PR #74994)

2023-12-10 Thread Nikolas Klauser via cfe-commits
@@ -343,6 +347,15 @@ public: return __data_[__idx]; } +# if _LIBCPP_STD_VER >= 26 +_LIBCPP_HIDE_FROM_ABI constexpr reference at(size_type __idx) const { + if (__idx >= size()) { +__throw_out_of_range(); + } + return *(data() + __idx);

[llvm] [clang-tools-extra] [libcxx] [clang] [libc++][span] P2821R5: span.at() (PR #74994)

2023-12-10 Thread Nikolas Klauser via cfe-commits
@@ -0,0 +1,136 @@ +//===--===// +// +// 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:

[clang-tools-extra] [clang] [llvm] [libcxx] [libc++][span] P2821R5: span.at() (PR #74994)

2023-12-10 Thread Nikolas Klauser via cfe-commits
@@ -0,0 +1,136 @@ +//===--===// +// +// 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:

[clang-tools-extra] [clang] [llvm] [libcxx] [libc++][span] P2821R5: span.at() (PR #74994)

2023-12-10 Thread Nikolas Klauser via cfe-commits
@@ -343,6 +347,15 @@ public: return __data_[__idx]; } +# if _LIBCPP_STD_VER >= 26 +_LIBCPP_HIDE_FROM_ABI constexpr reference at(size_type __idx) const { + if (__idx >= size()) { +__throw_out_of_range(); + } + return *(data() + __idx);

[llvm] [libcxx] [clang] [clang-tools-extra] [libc++][span] P2821R5: span.at() (PR #74994)

2023-12-10 Thread Nikolas Klauser via cfe-commits
@@ -0,0 +1,136 @@ +//===--===// +// +// 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:

[llvm] [libcxx] [clang-tools-extra] [clang] [libc++][span] P2821R5: span.at() (PR #74994)

2023-12-10 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 requested changes to this pull request. Looks mostly good, but I have a few small comments. https://github.com/llvm/llvm-project/pull/74994 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] [libcxx] [clang] [llvm] [libc++][span] P2821R5: span.at() (PR #74994)

2023-12-10 Thread Nikolas Klauser via cfe-commits
@@ -41,7 +41,6 @@ void testRuntimeSpan(Span sp, std::size_t idx) assert(r1 == r2); } -struct A{}; philnik777 wrote: Unrelated change? https://github.com/llvm/llvm-project/pull/74994 ___ cfe-commits mailing

[clang] [clang-tools-extra] [libcxx] [llvm] [libc++][span] P2821R5: span.at() (PR #74994)

2023-12-10 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 edited https://github.com/llvm/llvm-project/pull/74994 ___ 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)

2023-12-09 Thread Nikolas Klauser via cfe-commits
@@ -171,13 +172,61 @@ class DiagnosticMapping { class DiagnosticIDs : public RefCountedBase { public: /// The level of the diagnostic, after it has been through mapping. - enum Level { + enum Level : uint8_t { Ignored, Note, Remark, Warning, Error, Fatal }; + //

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

2023-12-09 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] [clang] Extend diagnose_if to accept more detailed warning

[llvm] [libcxx] [libunwind] [libc++] Allow running the test suite with optimizations (PR #68753)

2023-12-03 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 approved this pull request. https://github.com/llvm/llvm-project/pull/68753 ___ 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)

2023-12-02 Thread Nikolas Klauser via cfe-commits
@@ -92,14 +94,14 @@ namespace ImplicitCapture { [] { return ref_i; }; // expected-error {{variable 'ref_i' cannot be implicitly captured in a lambda with no capture-default specified}} expected-note {{lambda expression begins here}} expected-note 2 {{capture 'ref_i' by}}

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

2023-12-02 Thread Nikolas Klauser via cfe-commits
@@ -92,14 +94,14 @@ namespace ImplicitCapture { [] { return ref_i; }; // expected-error {{variable 'ref_i' cannot be implicitly captured in a lambda with no capture-default specified}} expected-note {{lambda expression begins here}} expected-note 2 {{capture 'ref_i' by}}

[clang] [clang] Fix crash when declaring invalid lambda member (PR #74110)

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

[clang] [clang] Fix crash when declaring invalid lambda member (PR #74110)

2023-12-02 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: > The tests changes look mostly unrelated to this PR They mostly are. I found this while trying to check C++03 with the test and noticed that C++11 also crashes, so I updated the test to also run in C++11. https://github.com/llvm/llvm-project/pull/74110

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

2023-12-02 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/73376 >From 563f86bddc0ec59b63c6aeffee2342f027c09119 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Fri, 1 Dec 2023 18:16:36 +0100 Subject: [PATCH 1/2] [clang] Fix crash when declaring invalid lambda member

[clang] [CUDA] work around more __noinline__ conflicts with libc++ (PR #74123)

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

<    1   2   3   >