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

2024-03-08 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/73376 >From 73135ec6395a6d3a29725e58b30ecb42249695fe Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Sat, 25 Nov 2023 04:00:57 +0100 Subject: [PATCH] [clang] Accept lambdas in C++03 as an extensions This is a

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

2024-03-08 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/73376 >From db504f5031b11ff7e28a346db829463fd6883d98 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Sat, 25 Nov 2023 04:00:57 +0100 Subject: [PATCH] [clang] Accept lambdas in C++03 as an extensions This is a

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

2024-03-08 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/84591 None >From 479b0dec7feb17beaccbdc029799f2333d979ce4 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 key

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

2024-03-08 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/84591 >From 634b8e8285b23201d7ad852ae35044d9b89c3c63 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][Driver] Merge the different strategies of how libc++ is included (PR #83721)

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

[clang] [Clang] Fix __has_cpp_attribute and C++11 attributes with arguments in C++03 (PR #83065)

2024-02-26 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/83065 The values for `__has_cpp_attribute` don't have to be guarded behind `LangOpts.CPlusPlus` because `__has_cpp_attribute` isn't available if Clang isn't in a C++ mode. Fixes #82995 >From b64d25b222b4c8c483

[clang] [Clang] Fix __has_cpp_attribute and C++11 attributes with arguments in C++03 (PR #83065)

2024-02-27 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/83065 >From 6a439dd61803e7da91a7791453ca7b9acb90b1b6 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Mon, 26 Feb 2024 22:39:05 +0100 Subject: [PATCH] [Clang] Fix __has_cpp_attribute and C++11 attributes with a

[clang] [Clang] Fix __has_cpp_attribute and C++11 attributes with arguments in C++03 (PR #83065)

2024-02-27 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/83065 >From 497b6639231f9d3141cc3278b3e476edd1d642d2 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Tue, 27 Feb 2024 14:40:42 +0100 Subject: [PATCH] [Clang] Fix __has_cpp_attribute and C++11 attributes with a

[clang] [Clang] Fix __has_cpp_attribute and C++11 attributes with arguments in C++03 (PR #83065)

2024-02-27 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/83065 >From f97ef5d3efc94585e531339a233cfb3007734d9a Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Tue, 27 Feb 2024 14:40:42 +0100 Subject: [PATCH] [Clang] Fix __has_cpp_attribute and C++11 attributes with a

[clang] [Clang] Fix __has_cpp_attribute and C++11 attributes with arguments in C++03 (PR #83065)

2024-02-27 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/83065 >From f97ef5d3efc94585e531339a233cfb3007734d9a Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Tue, 27 Feb 2024 14:40:42 +0100 Subject: [PATCH 1/2] [Clang] Fix __has_cpp_attribute and C++11 attributes wit

[clang] [Clang] Fix __has_cpp_attribute and C++11 attributes with arguments in C++03 (PR #83065)

2024-02-29 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/83065 >From 9b0ebc71341dbda73714c6fbd0da4ec7d338f4b7 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Tue, 27 Feb 2024 14:40:42 +0100 Subject: [PATCH 1/2] [Clang] Fix __has_cpp_attribute and C++11 attributes wit

[clang] [Clang] Fix __has_cpp_attribute and C++11 attributes with arguments in C++03 (PR #83065)

2024-02-29 Thread Nikolas Klauser via cfe-commits
@@ -1,7 +1,7 @@ -// RUN: %clang_cc1 -std=gnu++17 -fsyntax-only -fms-compatibility -verify %s - -void f() { - // GNU-style attributes are prohibited in this position. +// RUN: %clang_cc1 -std=gnu++17 -fsyntax-only -fms-compatibility -verify %s philnik777 wrote: I

[clang] [Clang] Fix __has_cpp_attribute and C++11 attributes with arguments in C++03 (PR #83065)

2024-02-29 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/83065 >From 84443dfd39a4a1c567a0e301a3d9892955b9a2fe Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Tue, 27 Feb 2024 14:40:42 +0100 Subject: [PATCH] [Clang] Fix __has_cpp_attribute and C++11 attributes with a

[clang] [Clang] Fix __has_cpp_attribute and C++11 attributes with arguments in C++03 (PR #83065)

2024-03-01 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: The CI failure is unrelated. https://github.com/llvm/llvm-project/pull/83065 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix __has_cpp_attribute and C++11 attributes with arguments in C++03 (PR #83065)

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

[clang] [clang][Builtins] Parse clang extended vectors types. (PR #83584)

2024-03-01 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: > @philnik777 - thank you for the patch at #68324 You're welcome! FWIW I'd find a syntax like `_ExtVector` better. The underscore and upper case to make it clear that it's non-standard and the angle bracket syntax since it's kind-of a template. This unfortunately doesn't ma

[clang] [clang][Builtins] Parse clang extended vectors types. (PR #83584)

2024-03-01 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: Hm, yeah. I don't think it's worth complicating the parser for a tiny bit of syntax sugar. I like your idea with a `:` quite a bit. `_ExtVector(bool:4)` would also be an option. I don't have a strong preference either way. I'd like to keep it separate from the name though to

[clang] [Clang][Driver] Merge the different strategies of how libc++ is included (PR #83721)

2024-03-03 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/83721 None >From 756f80f22744bb0f2bfb81e6c4010054f1279337 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Fri, 1 Mar 2024 20:49:30 +0100 Subject: [PATCH] [Clang][Driver] Merge the different strategies of how l

[clang] users/philnik777/add libcxx03 include strategy (PR #83723)

2024-03-03 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/83723 - [Clang][Driver] Merge the different strategies of how libc++ is included - [Clang][Driver] Add special-casing for including libc++ in C++03 >From 756f80f22744bb0f2bfb81e6c4010054f1279337 Mon Sep 17 00:00:00

[clang] [Clang][Driver] Add special-casing for including libc++ in C++03 (PR #83723)

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

[clang] [Clang][Driver] Add special-casing for including libc++ in C++03 (PR #83723)

2024-03-03 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 edited https://github.com/llvm/llvm-project/pull/83723 ___ 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-03-03 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: @AaronBallman Thanks for the review. Sorry for responding so late - I've missed your review. The tests aren't actually unrelated to the path. This is the file where I discovered the crash, so I just used it to demonstrate that it's fixed. I'm not sure how to split things, si

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

2024-03-05 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: Not right now. I think the first thing to do is moving all the builtins to tablegen before we can make better use of it, which is going to take a while. https://github.com/llvm/llvm-project/pull/68324 ___ cfe-commits mailing list cf

[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: Apac

[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 --

[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) initi

[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
@@ -1526,10 +1526,9 @@ bool CXXRecordDecl::isGenericLambda() const { #ifndef NDEBUG static bool allLookupResultsAreTheSame(const DeclContext::lookup_result &R) { - for (auto *D : R) -if (!declaresSameEntity(D, R.front())) - return false; - return true; + return llv

[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

[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

[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

[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++] Implem

[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)

[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 it

[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

[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 20:06:2

[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 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] [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, typein

[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] 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: https://github.com/llvm/llvm-project/commit/e099e7b278c774338c7019e38fbbca9ef2c8dd74.dif

[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] [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 di

[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"; + +templ

[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

[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 deprecate

[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]] --- cla

[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 `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 https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[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. +// SPDX-License

[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. +// SPDX-License

[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: Apa

[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. +// SPDX-License

[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 x86_

[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] [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

[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 <= AO__opencl_atomic_fetc

[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

[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-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 <= AO__opencl_atomic_fetc

[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-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

[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

[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

[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 --- clang/utils/ci/buildkite

[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/utils/ci/buildkite-pipel

[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/utils/ci/buildkite-pipel

[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/utils/ci/buildkite-pipel

[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] 874217f - [clang] Enable C++11-style attributes in all language modes

2023-07-22 Thread Nikolas Klauser via cfe-commits
Author: Nikolas Klauser Date: 2023-07-22T09:34:15-07:00 New Revision: 874217f99b99ab3c9026dc3b7bd84cd2beebde6e URL: https://github.com/llvm/llvm-project/commit/874217f99b99ab3c9026dc3b7bd84cd2beebde6e DIFF: https://github.com/llvm/llvm-project/commit/874217f99b99ab3c9026dc3b7bd84cd2beebde6e.dif

[libunwind] 3537338 - [libc++][libunwind] Fixes to allow GCC 13 to compile libunwind/libc++abi/libc++

2023-08-04 Thread Nikolas Klauser via cfe-commits
Author: Nikolas Klauser Date: 2023-08-04T00:51:43-07:00 New Revision: 3537338d1ab9b6da4b58499877953deb81c59e5e URL: https://github.com/llvm/llvm-project/commit/3537338d1ab9b6da4b58499877953deb81c59e5e DIFF: https://github.com/llvm/llvm-project/commit/3537338d1ab9b6da4b58499877953deb81c59e5e.dif

[clang] c6b4433 - [clang] Fix __is_trivially_equality_comparable for classes which contain arrays of non-trivially equality comparable types

2023-07-10 Thread Nikolas Klauser via cfe-commits
Author: Nikolas Klauser Date: 2023-07-10T11:09:38-07:00 New Revision: c6b4433a0f20c5ebbd72cee8fd0dcfdb429e619c URL: https://github.com/llvm/llvm-project/commit/c6b4433a0f20c5ebbd72cee8fd0dcfdb429e619c DIFF: https://github.com/llvm/llvm-project/commit/c6b4433a0f20c5ebbd72cee8fd0dcfdb429e619c.dif

[clang] 7a59e2c - [clang][NFC] Remove trailing whitespace from riscv_vector.td

2023-07-14 Thread Nikolas Klauser via cfe-commits
Author: Nikolas Klauser Date: 2023-07-14T12:38:29-07:00 New Revision: 7a59e2c59187fc76e39b0e4d5bfd13a0a5144c44 URL: https://github.com/llvm/llvm-project/commit/7a59e2c59187fc76e39b0e4d5bfd13a0a5144c44 DIFF: https://github.com/llvm/llvm-project/commit/7a59e2c59187fc76e39b0e4d5bfd13a0a5144c44.dif

[libunwind] a7aade1 - [runtimes] Synchronize warnings flags between libc++/libc++abi/libunwind

2023-03-16 Thread Nikolas Klauser via cfe-commits
Author: Nikolas Klauser Date: 2023-03-17T00:40:59+01:00 New Revision: a7aade1f36eb60161235b66bca46db12e5326a0c URL: https://github.com/llvm/llvm-project/commit/a7aade1f36eb60161235b66bca46db12e5326a0c DIFF: https://github.com/llvm/llvm-project/commit/a7aade1f36eb60161235b66bca46db12e5326a0c.dif

[clang] f6d557e - [clang][NFC] Remove trailing whitespaces and enforce it in lib, include and docs

2023-06-26 Thread Nikolas Klauser via cfe-commits
Author: Nikolas Klauser Date: 2023-06-26T09:34:36-07:00 New Revision: f6d557ee34b6bbdb1dc32f29e34b4a4a8ad35e81 URL: https://github.com/llvm/llvm-project/commit/f6d557ee34b6bbdb1dc32f29e34b4a4a8ad35e81 DIFF: https://github.com/llvm/llvm-project/commit/f6d557ee34b6bbdb1dc32f29e34b4a4a8ad35e81.dif

[clang] 4de66e8 - [clang] __is_trivially_equality_comparable should return false for arrays

2023-06-26 Thread Nikolas Klauser via cfe-commits
Author: Nikolas Klauser Date: 2023-06-26T09:36:58-07:00 New Revision: 4de66e8c44348fb1e85268b10a7f862381e695c7 URL: https://github.com/llvm/llvm-project/commit/4de66e8c44348fb1e85268b10a7f862381e695c7 DIFF: https://github.com/llvm/llvm-project/commit/4de66e8c44348fb1e85268b10a7f862381e695c7.dif

[clang] 3cf8b98 - [clang] Fix checking the equality comparator of base classes in __is_trivially_equality_comparable

2023-06-28 Thread Nikolas Klauser via cfe-commits
Author: Nikolas Klauser Date: 2023-06-28T13:34:02-07:00 New Revision: 3cf8b982042e91d9aabb880ccc7a556256187ff9 URL: https://github.com/llvm/llvm-project/commit/3cf8b982042e91d9aabb880ccc7a556256187ff9 DIFF: https://github.com/llvm/llvm-project/commit/3cf8b982042e91d9aabb880ccc7a556256187ff9.dif

[clang] e98776a - [clang] Add __is_trivially_equality_comparable

2023-04-17 Thread Nikolas Klauser via cfe-commits
Author: Nikolas Klauser Date: 2023-04-17T15:36:21+02:00 New Revision: e98776a180a74c08dcc07cebf26c11deac6e975a URL: https://github.com/llvm/llvm-project/commit/e98776a180a74c08dcc07cebf26c11deac6e975a DIFF: https://github.com/llvm/llvm-project/commit/e98776a180a74c08dcc07cebf26c11deac6e975a.dif

[clang] 0e4c4c7 - [clang] Extend __is_trivially_equality_comparable to check for hidden friends

2023-05-30 Thread Nikolas Klauser via cfe-commits
Author: Nikolas Klauser Date: 2023-05-30T08:33:31-07:00 New Revision: 0e4c4c77730810db235d377d49ba5860dfa0bd8d URL: https://github.com/llvm/llvm-project/commit/0e4c4c77730810db235d377d49ba5860dfa0bd8d DIFF: https://github.com/llvm/llvm-project/commit/0e4c4c77730810db235d377d49ba5860dfa0bd8d.dif

[libunwind] 141471a - [runtimes] Remove unused functions from Handle{Libcxx,Libunwind}Flags.cmake

2023-02-21 Thread Nikolas Klauser via cfe-commits
Author: Nikolas Klauser Date: 2023-02-22T00:38:44+01:00 New Revision: 141471a0cbf2d029899b29baf1a54a238f6067f9 URL: https://github.com/llvm/llvm-project/commit/141471a0cbf2d029899b29baf1a54a238f6067f9 DIFF: https://github.com/llvm/llvm-project/commit/141471a0cbf2d029899b29baf1a54a238f6067f9.dif

[clang] 465d487 - [clang] Fix __is_trivially_equality_comparable for non-trivially-copyable types

2023-05-08 Thread Nikolas Klauser via cfe-commits
Author: Nikolas Klauser Date: 2023-05-08T12:07:28-07:00 New Revision: 465d487481313492e13435f3f03874b923b86ce3 URL: https://github.com/llvm/llvm-project/commit/465d487481313492e13435f3f03874b923b86ce3 DIFF: https://github.com/llvm/llvm-project/commit/465d487481313492e13435f3f03874b923b86ce3.dif

[clang] b09fad7 - [clang] Document extensions from later standards

2023-05-11 Thread Nikolas Klauser via cfe-commits
Author: Nikolas Klauser Date: 2023-05-11T11:54:46-07:00 New Revision: b09fad7f8e9ce5b88fb467be012ea379efa3659d URL: https://github.com/llvm/llvm-project/commit/b09fad7f8e9ce5b88fb467be012ea379efa3659d DIFF: https://github.com/llvm/llvm-project/commit/b09fad7f8e9ce5b88fb467be012ea379efa3659d.dif

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

2024-02-15 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: Ping (@AaronBallman maybe?) 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 __is_trivially_equality_comparable returning true with ineligebile defaulted overloads (PR #93113)

2024-06-29 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: > > @ZequanWu I can't successfully build your reproducer with clang trunk. > > Would it be possible to provide the full test case or a fully reduced one? > > Because I reverted this change at > [567b2c6](https://github.com/llvm/llvm-project/commit/567b2c608c307c097315dd5ec4d6

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

2024-06-29 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: > > > > @ZequanWu I can't successfully build your reproducer with clang trunk. > > > > Would it be possible to provide the full test case or a fully reduced > > > > one? > > > > > > > > > Because I reverted this change at > > > [567b2c6](https://github.com/llvm/llvm-project

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

2024-07-06 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/97894 This reverts commit 567b2c608c307c097315dd5ec4d6a5bbcddf898d. >From 43b1972a867bf9fa16fdf0d93dcbca4deae9fd13 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Sat, 29 Jun 2024 21:51:02 +0200 Subject: [PAT

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

2024-07-06 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/5] [clang] Extend diagnose_if to accept more detailed warni

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

2024-09-03 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: Would it make sense to split this into (1) a diagnostic abou

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

2024-09-04 Thread Nikolas Klauser via cfe-commits
@@ -101,91 +102,164 @@ namespace clang { }; } -class DiagnosticMapping { - LLVM_PREFERRED_TYPE(diag::Severity) - unsigned Severity : 3; - LLVM_PREFERRED_TYPE(bool) - unsigned IsUser : 1; - LLVM_PREFERRED_TYPE(bool) - unsigned IsPragma : 1; - LLVM_PREFERRED_TYPE(bo

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

2024-09-04 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/9] [clang] Extend diagnose_if to accept more detailed warni

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

2024-09-04 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 01/10] [clang] Extend diagnose_if to accept more detailed war

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

2024-09-07 Thread Nikolas Klauser via cfe-commits
@@ -0,0 +1,184 @@ +// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -verify -std=c++17 %s +// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -verify -std=c++20 %s + +#if !__has_builtin(__builtin_common_type) +# error +#endif + +// expected-note@*:* {{

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

2024-09-07 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/7] [Clang] Add __common_type builtin --- clang/include/cl

[clang] [Clang] Add `__builtin_experimental_vectorcompress` (PR #102476)

2024-09-08 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: What's the status of this? I'd really like to use it in a libc++ optimization. https://github.com/llvm/llvm-project/pull/102476 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cf

[clang] [libcxx] [Clang] Add __builtin_common_type (PR #99473)

2024-09-08 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] [Clang] Fix crash due to invalid source location in __is_trivially_equality_comparable (PR #107815)

2024-09-09 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/107815 Fixes #10 >From 0059de326ef8dd01e24f45cb18d9035957e77873 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Mon, 9 Sep 2024 09:15:39 +0200 Subject: [PATCH] [Clang] Fix crash due to invalid source loca

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

2024-09-09 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: > clang already supports `?:` with a vector condition; does this add anything > new on top of that? This works with bool vectors. I didn't realize you could use the ternary operator, since I only tested with them. I guess we could extend the ternary operator to accept bool v

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

2024-09-09 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: > You mean, if all three operands are boolean vectors? I'm surprised that > doesn't already work. No, I mean I have a vector of bools and want to select a value based on that. e.g. `declval>() ? declval>() : declval>()`. https://github.com/llvm/llvm-project/pull/91306 _

[clang] [clang-tools-extra] [Clang] Add __type_list_dedup builtin to deduplicate types in template arguments (PR #106730)

2024-09-10 Thread Nikolas Klauser via cfe-commits
@@ -309,7 +309,10 @@ enum BuiltinTemplateKind : int { BTK__make_integer_seq, /// This names the __type_pack_element BuiltinTemplateDecl. - BTK__type_pack_element + BTK__type_pack_element, + + /// This names the __type_list_dedup BuiltinTemplateDecl. phi

[clang] [clang-tools-extra] [Clang] Add __type_list_dedup builtin to deduplicate types in template arguments (PR #106730)

2024-09-10 Thread Nikolas Klauser via cfe-commits
@@ -309,7 +309,10 @@ enum BuiltinTemplateKind : int { BTK__make_integer_seq, /// This names the __type_pack_element BuiltinTemplateDecl. - BTK__type_pack_element + BTK__type_pack_element, + + /// This names the __type_list_dedup BuiltinTemplateDecl. + BTK__type_list_de

<    1   2   3   4   5   6   >