[clang] [Clang][NFC] Restore "Non-comprehensive list of changes in this release" in ReleaseNotes (PR #102134)

2024-08-06 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok created https://github.com/llvm/llvm-project/pull/102134 This was removed in 10c6d6349e51bb245b9deec4aafca9885971135b >From 664647de07eaa6f1b4b0f94594e867740cb99717 Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Tue, 6 Aug 2024 13:32:04 +0100 Subject: [PATCH] [N

[clang] [Clang][NFC] Restore "Non-comprehensive list of changes in this release" in ReleaseNotes (PR #102134)

2024-08-06 Thread Mital Ashok via cfe-commits
MitalAshok wrote: See comment: https://github.com/llvm/llvm-project/commit/10c6d6349e51bb245b9deec4aafca9885971135b#r145078148 (This is a separate PR to make sure it isn't reverted as part of a bigger change) https://github.com/llvm/llvm-project/pull/102134 __

[clang] [Clang][Parser] Accept P2741R3 (static_assert with user-generated message) in C++11 as an extension (PR #102044)

2024-08-06 Thread Mital Ashok via cfe-commits
@@ -671,10 +671,8 @@ static void InitializeCPlusPlusFeatureTestMacros(const LangOptions &LangOpts, LangOpts.CPlusPlus23 ? "202211L" : LangOpts.CPlusPlus17 ? "201603L" : "200907");

[clang] [Clang] strengthen checks for 'main' function to meet [basic.start.main] p3 requirements (PR #101853)

2024-08-06 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok approved this pull request. Diagnostic changes are a minor nit, LGTM otherwise https://github.com/llvm/llvm-project/pull/101853 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[clang] [Clang] strengthen checks for 'main' function to meet [basic.start.main] p3 requirements (PR #101853)

2024-08-06 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok edited https://github.com/llvm/llvm-project/pull/101853 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] strengthen checks for 'main' function to meet [basic.start.main] p3 requirements (PR #101853)

2024-08-06 Thread Mital Ashok via cfe-commits
@@ -61,6 +64,64 @@ int q(void) // expected-no-diagnostics int main; +#elif TEST11 +extern "C" { + namespace Y { +int main; // expected-error {{main cannot be declared as global variable}} MitalAshok wrote: These diagnostics could be similar to: https://

[clang] [Clang] strengthen checks for 'main' function to meet [basic.start.main] p3 requirements (PR #101853)

2024-08-06 Thread Mital Ashok via cfe-commits
@@ -8052,10 +8061,7 @@ NamedDecl *Sema::ActOnVariableDeclarator( } // Special handling of variable named 'main'. - if (Name.getAsIdentifierInfo() && Name.getAsIdentifierInfo()->isStr("main") && - NewVD->getDeclContext()->getRedeclContext()->isTranslationUnit() && -

[clang] [Clang] strengthen checks for 'main' function to meet [basic.start.main] p3 requirements (PR #101853)

2024-08-06 Thread Mital Ashok via cfe-commits
@@ -12238,7 +12255,6 @@ void Sema::CheckMain(FunctionDecl* FD, const DeclSpec& DS) { << FixItHint::CreateRemoval(DS.getConstexprSpecLoc()); FD->setConstexprKind(ConstexprSpecKind::Unspecified); } MitalAshok wrote: ```suggestion } ``` (Unnece

[clang] [llvm] [Clang][Parser] Accept P2741R3 (static_assert with user-generated message) in C++11 as an extension (PR #102044)

2024-08-06 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/102044 >From 90441c251c1ec5a3b8be923ca9678c8d3d586bee Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Mon, 5 Aug 2024 20:29:12 +0100 Subject: [PATCH 1/6] [Clang][Sema] Backport P2741R3 (static_assert with user-gen

[clang] [llvm] [Clang][Parser] Accept P2741R3 (static_assert with user-generated message) in C++11 as an extension (PR #102044)

2024-08-06 Thread Mital Ashok via cfe-commits
@@ -105,6 +105,11 @@ C2y Feature Support C23 Feature Support ^^^ +Non-comprehensive list of changes in this release +- MitalAshok wrote: Opened as #102134 https://github.com/llvm/llvm-project/pu

[clang] [Clang][Parser] Accept P2741R3 (static_assert with user-generated message) in C++11 as an extension (PR #102044)

2024-08-06 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/102044 >From 90441c251c1ec5a3b8be923ca9678c8d3d586bee Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Mon, 5 Aug 2024 20:29:12 +0100 Subject: [PATCH 1/6] [Clang][Sema] Backport P2741R3 (static_assert with user-gen

[clang] [Clang][Parser] Accept P2741R3 (static_assert with user-generated message) in C++11 as an extension (PR #102044)

2024-08-06 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/102044 >From 90441c251c1ec5a3b8be923ca9678c8d3d586bee Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Mon, 5 Aug 2024 20:29:12 +0100 Subject: [PATCH 1/7] [Clang][Sema] Backport P2741R3 (static_assert with user-gen

[clang] [Clang][Parser] Accept P2741R3 (static_assert with user-generated message) in C++11 as an extension (PR #102044)

2024-08-06 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/102044 >From 90441c251c1ec5a3b8be923ca9678c8d3d586bee Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Mon, 5 Aug 2024 20:29:12 +0100 Subject: [PATCH 1/8] [Clang][Sema] Backport P2741R3 (static_assert with user-gen

[clang] [Clang][Parser] Accept P2741R3 (static_assert with user-generated message) in C++11 as an extension (PR #102044)

2024-08-06 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/102044 >From 90441c251c1ec5a3b8be923ca9678c8d3d586bee Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Mon, 5 Aug 2024 20:29:12 +0100 Subject: [PATCH 1/8] [Clang][Sema] Backport P2741R3 (static_assert with user-gen

[clang] [Clang][Parser] Accept P2741R3 (static_assert with user-generated message) in C++11 as an extension (PR #102044)

2024-08-06 Thread Mital Ashok via cfe-commits
@@ -1504,7 +1504,7 @@ Conditional ``explicit`` __cpp_conditional_explicit C+ ``static operator()``__cpp_static_call_operator C++23 C++03 Attributes on Lambda-Expressions

[clang] [Clang][Sema][OpenMP] Allow `num_teams` to accept multiple expressions (PR #99732)

2024-08-06 Thread Mital Ashok via cfe-commits
@@ -363,5 +363,7 @@ considered for standardization. Please post on the | device extension | `'ompx_bare' clause on 'target teams' construct | :good:`prototyped` | #66844, #70612 | |

[clang] [Clang][Parser] Accept P2741R3 (static_assert with user-generated message) in C++11 as an extension (PR #102044)

2024-08-07 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/102044 >From 90441c251c1ec5a3b8be923ca9678c8d3d586bee Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Mon, 5 Aug 2024 20:29:12 +0100 Subject: [PATCH 1/8] [Clang][Sema] Backport P2741R3 (static_assert with user-gen

[clang] [Clang] Reuse tail-padding for more types that are not POD for the purpose of layout (PR #90462)

2024-08-08 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/90462 >From 96ff21d5126ebb4b9a538b8eef11f8ac9e2194c5 Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Mon, 29 Apr 2024 12:27:04 +0100 Subject: [PATCH 1/4] [Clang] Reuse tail-padding for more types that are not POD

[clang] [Clang] Reuse tail-padding for more types that are not POD for the purpose of layout (PR #90462)

2024-08-08 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok edited https://github.com/llvm/llvm-project/pull/90462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Reuse tail-padding for more types that are not POD for the purpose of layout (PR #90462)

2024-08-08 Thread Mital Ashok via cfe-commits
MitalAshok wrote: @hubert-reinterpretcast There were none, now I've added some: https://github.com/llvm/llvm-project/blob/cf8be1bac0eb37caaaecd47cb463ca58ee0fbe59/clang/test/Layout/itanium-padded-bit-field.cpp https://github.com/llvm/llvm-project/pull/90462 _

[clang] [Clang] Reuse tail-padding for more types that are not POD for the purpose of layout (PR #90462)

2024-08-08 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/90462 >From 96ff21d5126ebb4b9a538b8eef11f8ac9e2194c5 Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Mon, 29 Apr 2024 12:27:04 +0100 Subject: [PATCH 1/6] [Clang] Reuse tail-padding for more types that are not POD

[clang] [Clang] Reuse tail-padding for more types that are not POD for the purpose of layout (PR #90462)

2024-08-08 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/90462 >From 96ff21d5126ebb4b9a538b8eef11f8ac9e2194c5 Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Mon, 29 Apr 2024 12:27:04 +0100 Subject: [PATCH 1/6] [Clang] Reuse tail-padding for more types that are not POD

[clang] [libcxx] [Clang] Implement CWG2137 (list-initialization from objects of the same type) (PR #94355)

2024-08-08 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/94355 >From ac803f979f2779da35a006988d2d42cdabbad252 Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Sat, 22 Jul 2023 20:07:00 +0100 Subject: [PATCH 1/7] [SemaCXX] Implement CWG2137 (list-initialization from objec

[clang] [HLSL] Add __is_scalarized_layout_compatible (PR #102227)

2024-08-08 Thread Mital Ashok via cfe-commits
MitalAshok wrote: Is this the expected behaviour: ```c++ struct EmptyPadding : Empty { Empty e; int X; }; struct Repeated : Empty, DerivedEmpty { int X; }; // expected-warning {{inaccessible due to ambiguity}} _Static_assert(sizeof(EmptyPadding) == 8, ""); _Static_assert(sizeof(Repeated) == 8,

[clang] [clang][Interp] Fall back to dummy pointers if createGlobal() fails (PR #102464)

2024-08-08 Thread Mital Ashok via cfe-commits
MitalAshok wrote: ```c++ struct Foo; struct Bar { static const Foo x; static const Foo y; }; static_assert(&Bar::x != nullptr, ""); // both-warning {{always true}} static_assert(&Bar::x != &Bar::y, ""); constexpr const Foo* xp = &Bar::x; struct Foo {}; static_assert(xp == &Bar::x); // This f

[clang] [libcxx] [Clang] Implement CWG2137 (list-initialization from objects of the same type) (PR #94355)

2024-08-08 Thread Mital Ashok via cfe-commits
MitalAshok wrote: @cor3ntin Could you merge this for me please? Thanks https://github.com/llvm/llvm-project/pull/94355 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement CWG2627 Bit-fields and narrowing conversions (PR #78112)

2024-08-08 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/78112 >From 92f8720e3d21521b589d5291f086a2f32b87bfe0 Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Sun, 14 Jan 2024 19:52:31 + Subject: [PATCH 01/13] [clang] [SemaCXX] Implement CWG2627 Bit-fields and narrow

[clang] [clang] Implement CWG2627 Bit-fields and narrowing conversions (PR #78112)

2024-08-08 Thread Mital Ashok via cfe-commits
MitalAshok wrote: @AaronBallman I think I've addressed all your comments, thanks for the review! Could you please merge this for me if there is nothing else? https://github.com/llvm/llvm-project/pull/78112 ___ cfe-commits mailing list cfe-commits@list

[clang] [clang] Implement CWG2627 Bit-fields and narrowing conversions (PR #78112)

2024-08-08 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/78112 >From 92f8720e3d21521b589d5291f086a2f32b87bfe0 Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Sun, 14 Jan 2024 19:52:31 + Subject: [PATCH 01/14] [clang] [SemaCXX] Implement CWG2627 Bit-fields and narrow

[clang] [Clang] Check constraints for an explicit instantiation of a member function (PR #104438)

2024-08-18 Thread Mital Ashok via cfe-commits
@@ -5663,6 +5663,8 @@ def err_explicit_instantiation_internal_linkage : Error< def err_explicit_instantiation_not_known : Error< "explicit instantiation of %0 does not refer to a function template, " "variable template, member function, member class, or static data member">

[clang] [Clang] Do not allow `[[clang::lifetimebound]]` on explicit object member functions (PR #96113)

2024-08-18 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/96113 >From 453fea9fee85aef61c449761f24b0accecf03d29 Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Wed, 19 Jun 2024 21:03:34 +0100 Subject: [PATCH 1/2] [Clang] Do not allow `[[clang::lifetimebound]]` on explicit

[clang] [Clang] `constexpr` builtin floating point classification / comparison functions (PR #94118)

2024-08-18 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/94118 >From ed1c00ee4474a626965290f2d16aaaf0f4519ec9 Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Sat, 1 Jun 2024 17:45:21 +0100 Subject: [PATCH 1/5] constexpr __builtin_signbit --- clang/include/clang/Basic/B

[clang] [Clang] `constexpr` builtin floating point classification / comparison functions (PR #94118)

2024-08-18 Thread Mital Ashok via cfe-commits
MitalAshok wrote: @Endilll This should be done, just needs to be merged https://github.com/llvm/llvm-project/pull/94118 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] `constexpr` builtin floating point classification / comparison functions (PR #94118)

2024-08-18 Thread Mital Ashok via cfe-commits
MitalAshok wrote: @tbaederr Thanks for fixing the build bots. The leak appears to be unrelated to these changes and happen on this line: https://github.com/llvm/llvm-project/blob/71801707e33c235656b172fa7dfb8662473a95c2/clang/test/Sema/constant-builtins-2.c#L309 It even happens with: ```c int

[clang] [Clang][test] Add bytecode interpreter tests for floating comparison functions (PR #104703)

2024-08-18 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok created https://github.com/llvm/llvm-project/pull/104703 See also: #94118, 71801707e33c235656b172fa7dfb8662473a95c2 >From 76735bd57b948dcbd366a80b846be38f0bf8c41e Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Sun, 18 Aug 2024 14:12:51 +0100 Subject: [PATCH] [C

[clang] [Clang][test] Add bytecode interpreter tests for floating comparison functions (PR #104703)

2024-08-18 Thread Mital Ashok via cfe-commits
MitalAshok wrote: @tbaederr I've basically just copied over the tests from the other file. There's no other quad-precision (`__float128`) tests so they were removed. Do these need to be rewritten in a C++ style? (i.e., replace the macros with template functions) https://github.com/llvm/llv

[clang] [Clang] CWG722: nullptr to ellipses (PR #104704)

2024-08-18 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok created https://github.com/llvm/llvm-project/pull/104704 https://cplusplus.github.io/CWG/issues/722.html nullptr passed to a variadic function now converted to void* in C++. This does not affect C23 nullptr. Also fixes -Wformat-pedantic so that it no longer warns

[clang] [Clang] CWG722: nullptr to ellipses (PR #104704)

2024-08-18 Thread Mital Ashok via cfe-commits
MitalAshok wrote: This was originally part of https://reviews.llvm.org/D156054 (Previously reviewed by @AaronBallman), but there have been a lot of changes. https://github.com/llvm/llvm-project/pull/104704 ___ cfe-commits mailing list cfe-commits@lis

[clang] [Clang] CWG722: nullptr to ellipses (PR #104704)

2024-08-18 Thread Mital Ashok via cfe-commits
@@ -0,0 +1,56 @@ +// RUN: %clang_cc1 -std=c++98 %s -verify -pedantic-errors +// RUN: %clang_cc1 -std=c++11 %s -verify -pedantic-errors -ast-dump | FileCheck %s +// RUN: %clang_cc1 -std=c++14 %s -verify -pedantic-errors -ast-dump | FileCheck %s +// RUN: %clang_cc1 -std=c++17 %s -

[clang] [Clang] Do not allow `[[clang::lifetimebound]]` on explicit object member functions (PR #96113)

2024-08-18 Thread Mital Ashok via cfe-commits
MitalAshok wrote: @cor3ntin Yes, thanks https://github.com/llvm/llvm-project/pull/96113 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][C23] Support N3029 Improved Normal Enumerations (PR #103917)

2024-08-19 Thread Mital Ashok via cfe-commits
@@ -19474,11 +19474,12 @@ EnumConstantDecl *Sema::CheckEnumConstant(EnumDecl *Enum, // representable as an int. // Complain if the value is not representable in an int. - if (!isRepresentableIntegerValue(Context, EnumVal, Context.IntTy)) -

[clang] [clang][C23] Support N3029 Improved Normal Enumerations (PR #103917)

2024-08-19 Thread Mital Ashok via cfe-commits
@@ -125,6 +125,8 @@ C2y Feature Support C23 Feature Support ^^^ +- Clang now supports `N3029 `_ Improved Normal Enumerations. MitalAshok wrote: ```suggestion - Clang now supports `N

[clang] [Clang] Add __builtin_is_within_lifetime to implement P2641R4's std::is_within_lifetime (PR #91895)

2024-08-20 Thread Mital Ashok via cfe-commits
@@ -3760,6 +3765,9 @@ findSubobject(EvalInfo &Info, const Expr *E, const CompleteObject &Obj, if ((O->isAbsent() && !(handler.AccessKind == AK_Construct && I == N)) || (O->isIndeterminate() && !isValidIndeterminateAccess(handler.AccessKind))) { + // O

[clang] [Clang] Add __builtin_is_within_lifetime to implement P2641R4's std::is_within_lifetime (PR #91895)

2024-08-20 Thread Mital Ashok via cfe-commits
@@ -17264,3 +17288,76 @@ bool Expr::tryEvaluateStrLen(uint64_t &Result, ASTContext &Ctx) const { EvalInfo Info(Ctx, Status, EvalInfo::EM_ConstantFold); return EvaluateBuiltinStrLen(this, Result, Info); } + +namespace { +struct IsWithinLifetimeHandler { + EvalInfo &Info; +

[clang] [Clang] Add __builtin_is_within_lifetime to implement P2641R4's std::is_within_lifetime (PR #91895)

2024-08-20 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/91895 >From f602189e20d15d7805b40f60b9383c83117b7d04 Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Tue, 20 Aug 2024 13:23:52 +0100 Subject: [PATCH 1/3] [Clang] Add __builtin_is_within_lifetime to implement P2641

[clang] [Clang] Add __builtin_is_within_lifetime to implement P2641R4's std::is_within_lifetime (PR #91895)

2024-08-20 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/91895 >From f602189e20d15d7805b40f60b9383c83117b7d04 Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Tue, 20 Aug 2024 13:23:52 +0100 Subject: [PATCH 1/4] [Clang] Add __builtin_is_within_lifetime to implement P2641

[clang] [Clang] Add __builtin_is_within_lifetime to implement P2641R4's std::is_within_lifetime (PR #91895)

2024-08-20 Thread Mital Ashok via cfe-commits
@@ -169,14 +169,14 @@ def note_constexpr_this : Note< def access_kind : TextSubstitution< "%select{read of|read of|assignment to|increment of|decrement of|" "member call on|dynamic_cast of|typeid applied to|construction of|" - "destruction of}0">; + "destruction of|read o

[clang] [Clang] Add __builtin_is_within_lifetime to implement P2641R4's std::is_within_lifetime (PR #91895)

2024-08-20 Thread Mital Ashok via cfe-commits
MitalAshok wrote: @cor3ntin I will, yes. But this probably at least needs some libc++ reviewers https://github.com/llvm/llvm-project/pull/91895 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[clang] [Clang] CWG722: nullptr to ellipses (PR #104704)

2024-08-20 Thread Mital Ashok via cfe-commits
MitalAshok wrote: @cor3ntin Yes, there's no more planned for this pr. Thanks in advance! https://github.com/llvm/llvm-project/pull/104704 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang] [Clang] Implement CWG2351 `void{}` (PR #78060)

2024-08-20 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/78060 >From 6ed7cad5d4993603221c3d9a777463675d69643b Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Sat, 13 Jan 2024 18:03:15 + Subject: [PATCH 1/4] [SemaCXX] Implement CWG2351 `void{}` --- clang/docs/Releas

[clang] [NFC] Replace bool <= bool comparison (PR #102948)

2024-08-21 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok edited https://github.com/llvm/llvm-project/pull/102948 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add __builtin_is_within_lifetime to implement P2641R4's std::is_within_lifetime (PR #91895)

2024-08-23 Thread Mital Ashok via cfe-commits
@@ -0,0 +1,431 @@ +// RUN: %clang_cc1 -std=c++20 -Wno-unused %s -verify=expected,cxx20 -Wno-vla-cxx-extension +// RUN: %clang_cc1 -std=c++23 -Wno-unused %s -verify=expected,sincecxx23 -Wno-vla-cxx-extension +// RUN: %clang_cc1 -std=c++26 -Wno-unused %s -verify=expected,sincecxx2

[clang] [clang] Implement CWG2851: floating-point conversions in converted constant expressions (PR #90387)

2024-06-21 Thread Mital Ashok via cfe-commits
MitalAshok wrote: @shafik Yeah, just waiting on the tests after the merge https://github.com/llvm/llvm-project/pull/90387 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang] Fix definition of layout-compatible to ignore empty classes (PR #92103)

2024-06-22 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/92103 >From 5908130604728b9aa9b70eeb2523d368df08e68d Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Tue, 14 May 2024 08:28:19 +0100 Subject: [PATCH 1/4] [Clang] Fix definition of layout-compatible to ignore empty

[clang] [llvm] [Clang] Fix definition of layout-compatible to ignore empty classes (PR #92103)

2024-06-22 Thread Mital Ashok via cfe-commits
MitalAshok wrote: https://github.com/llvm/llvm-project/blob/b0ae923ada836fa2c9114ac2c5afb39466f49fe0/clang/docs/ReleaseNotes.rst#L210-L212 Should be enough for ReleaseNotes, since not much has changed since Clang 18 https://github.com/llvm/llvm-project/pull/92103 ___

[clang] [clang][Sema] Fix crash on atomic builtins with incomplete type args (PR #96374)

2024-06-22 Thread Mital Ashok via cfe-commits
MitalAshok wrote: Could you knock out a related bug at the same time: ```c++ template struct X { char arr[1]; }; extern X* p, *q; //X inst; void f() { __atomic_exchange(p, p, q, __ATOMIC_RELAXED); } ``` With the line commented out, currently this crashes, but in Clang 18 and with your pa

[clang] [clang][NFC] Use range-based for loops (PR #96831)

2024-06-28 Thread Mital Ashok via cfe-commits
@@ -2056,40 +2056,41 @@ void CXXRecordDecl::completeDefinition() { completeDefinition(nullptr); } +static bool hasPureVirtualFinalOverrider( +const CXXRecordDecl &RD, const CXXFinalOverriderMap *FinalOverriders) { + auto ExistsIn = [](const CXXFinalOverriderMap &FinalOv

[clang] [Clang] Implement CWG2351 `void{}` (PR #78060)

2024-06-29 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/78060 >From 6ed7cad5d4993603221c3d9a777463675d69643b Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Sat, 13 Jan 2024 18:03:15 + Subject: [PATCH 1/3] [SemaCXX] Implement CWG2351 `void{}` --- clang/docs/Releas

[clang] [clang] [SemaCXX] Implement CWG2627 Bit-fields and narrowing conversions (PR #78112)

2024-06-29 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/78112 >From 92f8720e3d21521b589d5291f086a2f32b87bfe0 Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Sun, 14 Jan 2024 19:52:31 + Subject: [PATCH 1/9] [clang] [SemaCXX] Implement CWG2627 Bit-fields and narrowin

[clang] [Clang] Qualified functions can't decay into pointers (PR #90353)

2024-06-29 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/90353 >From b81ffefb52981276b70570f878e3e75e30a49fbb Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Sat, 27 Apr 2024 19:15:00 +0100 Subject: [PATCH] [Clang] Qualified functions can't decay into pointers --- clan

[clang] [Clang] [C23] Fix typeof_unqual for qualified array types (PR #92767)

2024-06-29 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/92767 >From f87cb4c754a477515746e2ac2f8906b93ccd1fe3 Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Mon, 20 May 2024 15:58:58 +0100 Subject: [PATCH 1/5] [Clang] [C23] Fix typeof_unqual for qualified array types P

[clang] [clang-tools-extra] [Clang] Implement CWG2813: Class member access with prvalues (PR #95112)

2024-06-29 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/95112 >From e53dfbc9b2c6b7f30c1378731d7de284fa99d568 Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Tue, 11 Jun 2024 14:26:38 +0100 Subject: [PATCH 1/5] [Clang] Implement CWG2813 --- clang/docs/ReleaseNotes.rst

[clang] [clang-tools-extra] [Clang] Implement CWG2813: Class member access with prvalues (PR #95112)

2024-06-29 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/95112 >From e53dfbc9b2c6b7f30c1378731d7de284fa99d568 Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Tue, 11 Jun 2024 14:26:38 +0100 Subject: [PATCH 1/6] [Clang] Implement CWG2813 --- clang/docs/ReleaseNotes.rst

[clang] [Clang] Allow user defined conversion implicit cast to _Complex types in constant expressions (PR #108758)

2024-09-15 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok created https://github.com/llvm/llvm-project/pull/108758 This already worked with `-fexperimental-new-constant-interpreter` Fixes #108750 >From 0a6b4e83318af66888f6297549a806b5d81e4933 Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Sun, 15 Sep 2024 15:48:59 +01

[clang] [Clang] Reject "this void" (CWG2915) (PR #108817)

2024-09-16 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok created https://github.com/llvm/llvm-project/pull/108817 https://cplusplus.github.io/CWG/issues/2915.html Previously, `struct A { void f(this void); };` was accepted with `A::f` being a member function with no non-object arguments, but it was still a little wonky

[clang] [Clang] Reject `this void` explicit object parameters (CWG2915) (PR #108817)

2024-09-16 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok edited https://github.com/llvm/llvm-project/pull/108817 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Allow user defined conversion implicit cast to _Complex types in constant expressions (PR #108758)

2024-09-16 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok edited https://github.com/llvm/llvm-project/pull/108758 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Allow user defined conversion implicit cast to _Complex types in constant expressions (PR #108758)

2024-09-16 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/108758 >From 0a6b4e83318af66888f6297549a806b5d81e4933 Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Sun, 15 Sep 2024 15:48:59 +0100 Subject: [PATCH] [Clang] Allow user defined conversion implicit cast to _Comple

[clang] [Clang] Reject `this void` explicit object parameters (CWG2915) (PR #108817)

2024-09-16 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/108817 >From f283645de806c71d93ec10bc7fcb933ccbfee156 Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Mon, 16 Sep 2024 12:22:01 +0100 Subject: [PATCH 1/2] [Clang] Reject "this void" (CWG2915) --- clang/docs/Relea

[clang] [Clang] Reject `this void` explicit object parameters (CWG2915) (PR #108817)

2024-09-16 Thread Mital Ashok via cfe-commits
MitalAshok wrote: @shafik: Since this is a generated file, it is very easy to regenerate after a revert with `python3 clang/www/make_cxx_dr_status && git commit -am '[Clang][NFC] Update cxx_dr_status.html'` @Endilll: I've removed the other changes from `cxx_dr_status.html` manually from this

<    1   2   3   4   5