MitalAshok wrote:
See also: #83279
https://github.com/llvm/llvm-project/pull/92263
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/MitalAshok updated
https://github.com/llvm/llvm-project/pull/92263
>From 6496dbfc8100812c8d3ea5a668af0593b532e4fe Mon Sep 17 00:00:00 2001
From: Mital Ashok
Date: Wed, 15 May 2024 14:23:17 +0100
Subject: [PATCH 1/2] [Clang][Sema] Fix last argument not being used when
compari
https://github.com/MitalAshok created
https://github.com/llvm/llvm-project/pull/92299
Fixes #92284
>From 98d773a3a0a2faa407fddb20a63db7bf01890a98 Mon Sep 17 00:00:00 2001
From: Mital Ashok
Date: Wed, 15 May 2024 18:50:14 +0100
Subject: [PATCH] [Clang] [Sema] Fix some assertions not looking thr
https://github.com/MitalAshok edited
https://github.com/llvm/llvm-project/pull/92299
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/MitalAshok updated
https://github.com/llvm/llvm-project/pull/92299
>From b6cb1c53a20637255bf869617b60155bfb636c60 Mon Sep 17 00:00:00 2001
From: Mital Ashok
Date: Wed, 15 May 2024 18:50:14 +0100
Subject: [PATCH] [Clang] Fix some assertions not looking through type sugar
Fixe
@@ -5591,7 +5592,11 @@ FunctionTemplateDecl *Sema::getMoreSpecializedTemplate(
IsRValRef1);
Args2.push_back(Obj2Ty);
}
-size_t NumComparedArguments = NumCallArguments1 + ShouldConvert1;
+size_t NumComparedArguments
https://github.com/MitalAshok updated
https://github.com/llvm/llvm-project/pull/92263
>From 6496dbfc8100812c8d3ea5a668af0593b532e4fe Mon Sep 17 00:00:00 2001
From: Mital Ashok
Date: Wed, 15 May 2024 14:23:17 +0100
Subject: [PATCH 1/2] [Clang][Sema] Fix last argument not being used when
compari
MitalAshok wrote:
@Sirraide Oh I didn't see the conflict, thanks. It should be fine now?
https://github.com/llvm/llvm-project/pull/92263
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/MitalAshok updated
https://github.com/llvm/llvm-project/pull/91895
>From 56aed689dc5825fc5bacc6dfdff58ee0eaf71f82 Mon Sep 17 00:00:00 2001
From: Mital Ashok
Date: Sun, 12 May 2024 19:48:24 +0100
Subject: [PATCH 1/8] [Clang] Add attribute for consteval builtins; Declare
const
https://github.com/MitalAshok edited
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-commits
https://github.com/MitalAshok updated
https://github.com/llvm/llvm-project/pull/91895
>From 56aed689dc5825fc5bacc6dfdff58ee0eaf71f82 Mon Sep 17 00:00:00 2001
From: Mital Ashok
Date: Sun, 12 May 2024 19:48:24 +0100
Subject: [PATCH 1/9] [Clang] Add attribute for consteval builtins; Declare
const
https://github.com/MitalAshok ready_for_review
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-commits
https://github.com/MitalAshok created
https://github.com/llvm/llvm-project/pull/92767
Properly remove qualifiers for both the element type and the array type
Fixes #92667
>From f87cb4c754a477515746e2ac2f8906b93ccd1fe3 Mon Sep 17 00:00:00 2001
From: Mital Ashok
Date: Mon, 20 May 2024 15:58:58
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/2] [Clang] [C23] Fix typeof_unqual for qualified array types
P
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/3] [Clang] [C23] Fix typeof_unqual for qualified array types
P
https://github.com/MitalAshok created
https://github.com/llvm/llvm-project/pull/92814
A new warning -Wdelete-array is issued for the now-accepted delete of an array,
which becomes a pointer to the first element after an array-to-pointer
conversion.
The GNU extension of deleting a void pointer
MitalAshok wrote:
The array-to-pointer conversion *is* necessary, even if it's impractical to use:
https://eel.is/c++draft/expr.delete#1.sentence-5
> Otherwise, it shall be a prvalue of pointer to object type.
https://eel.is/c++draft/basic.lval#6
> Whenever a glvalue appears as an operand of
MitalAshok wrote:
@dwblaikie This patch will bring Clang in line with GCC and MSVC:
https://godbolt.org/z/nj715zbsW
https://github.com/llvm/llvm-project/pull/92103
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/
@@ -561,6 +561,42 @@ void CXXRecordDecl::addedClassSubobject(CXXRecordDecl
*Subobj) {
data().StructuralIfLiteral = false;
}
+const CXXRecordDecl *CXXRecordDecl::getStandardLayoutBaseWithFields() const {
+#ifndef NDEBUG
+ {
+assert(
+isStandardLayout() &&
+
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/3] [Clang] Fix definition of layout-compatible to ignore
empty
@@ -1230,11 +1230,11 @@ namespace cwg598 { // cwg598: yes
int &t = h(N::i);
}
-namespace cwg599 { // cwg599: partial
+namespace cwg599 { // cwg599: 19
typedef int Fn();
struct S { operator void*(); };
struct T { operator Fn*(); };
- struct U { operator int*(); oper
@@ -1245,12 +1245,7 @@ namespace cwg599 { // cwg599: partial
// expected-error@-1 {{cannot delete expression with pointer-to-'void'
type 'void *'}}
delete t;
// expected-error@-1 {{cannot delete expression of type 'T'}}
-// FIXME: This is valid, but is rejected
MitalAshok wrote:
I've also found and fixed a related bug where types were compared with `==` not
`hasSameType`, leading to two conversion operators appearing to be different
when they are the same and Clang not compiling valid code:
https://godbolt.org/z/nY7svGKn8
https://github.com/llvm/llv
https://github.com/MitalAshok updated
https://github.com/llvm/llvm-project/pull/92814
>From 43e9f8fe5cdb19c0f57a00b352592e56e470ffe7 Mon Sep 17 00:00:00 2001
From: Mital Ashok
Date: Mon, 20 May 2024 20:18:48 +0100
Subject: [PATCH 1/2] [Clang] Change how the argument of a delete expression is
c
https://github.com/MitalAshok updated
https://github.com/llvm/llvm-project/pull/92814
>From 43e9f8fe5cdb19c0f57a00b352592e56e470ffe7 Mon Sep 17 00:00:00 2001
From: Mital Ashok
Date: Mon, 20 May 2024 20:18:48 +0100
Subject: [PATCH 1/2] [Clang] Change how the argument of a delete expression is
c
https://github.com/MitalAshok updated
https://github.com/llvm/llvm-project/pull/92814
>From 43e9f8fe5cdb19c0f57a00b352592e56e470ffe7 Mon Sep 17 00:00:00 2001
From: Mital Ashok
Date: Mon, 20 May 2024 20:18:48 +0100
Subject: [PATCH 1/3] [Clang] Change how the argument of a delete expression is
c
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/4] [Clang] [C23] Fix typeof_unqual for qualified array types
P
https://github.com/MitalAshok edited
https://github.com/llvm/llvm-project/pull/78060
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/MitalAshok edited
https://github.com/llvm/llvm-project/pull/78060
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/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/2] [SemaCXX] Implement CWG2351 `void{}`
---
clang/docs/Releas
MitalAshok wrote:
@zygoloid The commit message was a bit outdated, it now takes the void type
from `T` instead of the initializer list (this also preserves extra info like
if it came from a typedef)
I've also changed it to `CK_ToVoid`
https://github.com/llvm/llvm-project/pull/78060
__
https://github.com/MitalAshok edited
https://github.com/llvm/llvm-project/pull/78060
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/MitalAshok edited
https://github.com/llvm/llvm-project/pull/90353
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/MitalAshok updated
https://github.com/llvm/llvm-project/pull/90353
>From 73f6c4ee69399011a781a61283316efd491b3d28 Mon Sep 17 00:00:00 2001
From: Mital Ashok
Date: Sat, 27 Apr 2024 19:15:00 +0100
Subject: [PATCH] [SemaCXX] Qualified functions can't decay into pointers
Fixes #
https://github.com/MitalAshok updated
https://github.com/llvm/llvm-project/pull/90353
>From c6cd95926b0de2687f56a4966ebb5babd30ba33f 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
Fixes #27
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] [Clang] Reuse tail-padding for more types that are not POD
for
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] [clang] [SemaCXX] Implement CWG2627 Bit-fields and narrowing
co
https://github.com/MitalAshok edited
https://github.com/llvm/llvm-project/pull/78112
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/MitalAshok created
https://github.com/llvm/llvm-project/pull/93046
This DR's effects are backported to C++98.
Does not affect C where integral constant expressions cannot involve pointers.
>From aa5e7f71efdfcdea902ac881fd8db6b7c4f4538d Mon Sep 17 00:00:00 2001
From: Mital As
https://github.com/MitalAshok updated
https://github.com/llvm/llvm-project/pull/93046
>From e1172958f43af7490b5b6e3752a9070265ad17ca Mon Sep 17 00:00:00 2001
From: Mital Ashok
Date: Wed, 22 May 2024 16:01:13 +0100
Subject: [PATCH] [Clang] CWG2749: relational operators involving pointers to
voi
https://github.com/MitalAshok edited
https://github.com/llvm/llvm-project/pull/93046
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/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/2] [Clang] Reuse tail-padding for more types that are not
POD
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/2] [clang] [SemaCXX] Implement CWG2627 Bit-fields and
narrowin
https://github.com/MitalAshok updated
https://github.com/llvm/llvm-project/pull/92814
>From 43e9f8fe5cdb19c0f57a00b352592e56e470ffe7 Mon Sep 17 00:00:00 2001
From: Mital Ashok
Date: Mon, 20 May 2024 20:18:48 +0100
Subject: [PATCH 1/3] [Clang] Change how the argument of a delete expression is
c
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/3] [clang] [SemaCXX] Implement CWG2627 Bit-fields and
narrowin
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/3] [clang] [SemaCXX] Implement CWG2627 Bit-fields and
narrowin
https://github.com/MitalAshok edited
https://github.com/llvm/llvm-project/pull/78112
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/MitalAshok created
https://github.com/llvm/llvm-project/pull/93380
Fixes #92497
The existing implementation did try to drill into anonymous structs and compare
them member by member, but it did not properly build up the member access
expressions to include the anonymous str
MitalAshok wrote:
Revived from https://reviews.llvm.org/D154716
This probably needs a fresh review, I've just rebased onto main.
The problem still exists on main: https://godbolt.org/z/vPTb4qEnd
CC @cor3ntin @shafik (as people who reviewed on the phabricator)
https://github.com/llvm/llvm-proj
https://github.com/MitalAshok updated
https://github.com/llvm/llvm-project/pull/101382
>From 9dcbd0779bf379bbf62bf52247ef46de82cb4877 Mon Sep 17 00:00:00 2001
From: Mital Ashok
Date: Wed, 31 Jul 2024 19:18:09 +0100
Subject: [PATCH 1/2] [clang][Tests][NFC] Add CWG882 test (Defining `main` as
de
MitalAshok wrote:
I think the issue is here somewhere:
https://github.com/llvm/llvm-project/blob/7088a5ed880f29129ec844c66068e8cb61ca98bf/clang/lib/Sema/SemaDecl.cpp#L8753-L8764
An incomplete struct passes `CheckC23ConstexprVarType` (which it should,
incomplete types should fail later) so it g
@@ -9267,14 +9267,14 @@ bool Sema::RequireLiteralType(SourceLocation Loc,
QualType T,
if (!RT)
return true;
- const CXXRecordDecl *RD = cast(RT->getDecl());
-
// A partially-defined class type can't be a literal type, because a literal
// class type must have a t
MitalAshok wrote:
@Endilll Yes, thanks!
https://github.com/llvm/llvm-project/pull/101382
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/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/6] [Clang] Fix definition of layout-compatible to ignore
empty
https://github.com/MitalAshok updated
https://github.com/llvm/llvm-project/pull/97200
>From 0dea95701ca4dfca9b7d0bd889003fc35aa3017e Mon Sep 17 00:00:00 2001
From: Mital Ashok
Date: Sun, 30 Jun 2024 10:39:15 +0100
Subject: [PATCH 01/14] [NFC] [Clang] Some core issues have changed status from
t
MitalAshok wrote:
@Endilll It should be good to merge after the last quick commit (which just ran
cxx_make_dr_status). Could you please merge this for me? Thanks!
https://github.com/llvm/llvm-project/pull/97200
___
cfe-commits mailing list
cfe-commits
MitalAshok wrote:
A list of places this could be used:
https://eel.is/c++draft/cmp.result#1
https://eel.is/c++draft/meta.rqmts#4
https://eel.is/c++draft/execpol.type#3
https://eel.is/c++draft/format.arg#2
https://eel.is/c++draft/range.adaptor.object#5
https://eel.is/c++draft/coro.generator.class
@@ -975,6 +975,15 @@ Query for this feature with
``__has_attribute(diagnose_if)``.
}];
}
+def DiagnoseSpecializationsDocs : Documentation {
+ let Category = DocCatDecl;
+ let Content = [{
+``clang::diagnose_specializations`` can be appied to class templates which
+should
@@ -975,6 +975,15 @@ Query for this feature with
``__has_attribute(diagnose_if)``.
}];
}
+def DiagnoseSpecializationsDocs : Documentation {
+ let Category = DocCatDecl;
+ let Content = [{
+``clang::diagnose_specializations`` can be appied to class templates which
+should
MitalAshok wrote:
@Endilll @AaronBallman Removed the release note and the tests have passed
again. Would appreciate if someone else could start the backport process
afterwards since I don't know how to do it.
https://github.com/llvm/llvm-project/pull/92103
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
MitalAshok wrote:
Ping @cor3ntin (This missed Clang 19 but could you merge it for Clang 20?)
https://github.com/llvm/llvm-project/pull/78060
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com
https://github.com/MitalAshok created
https://github.com/llvm/llvm-project/pull/101702
Make sure that the functions are instantiated to deduce the return type. Fixes
#101614
Allow `BuiltinFnTy` in `BuildDecltypeType` (these are wrapped in a
`DeclRefExpr` that has the actual type). Fixes #1016
https://github.com/MitalAshok updated
https://github.com/llvm/llvm-project/pull/101702
>From 4a7bda13cf7804db1ffce81d3aac77a192585e07 Mon Sep 17 00:00:00 2001
From: Mital Ashok
Date: Fri, 2 Aug 2024 16:27:54 +0100
Subject: [PATCH] [Clang] Support for LibBuiltins with placeholder return types
-
https://github.com/MitalAshok edited
https://github.com/llvm/llvm-project/pull/101702
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/MitalAshok edited
https://github.com/llvm/llvm-project/pull/101702
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/MitalAshok created
https://github.com/llvm/llvm-project/pull/101871
This attribute applies to `GCCAsmStmt` statements or functions. If a function
is declared with this, it is effectively the default for all `GCCAsmStmt`s
contained in the function.
Takes one string argument:
https://github.com/MitalAshok updated
https://github.com/llvm/llvm-project/pull/101871
>From 321934e1fc59908cbcd7fac4992e2b85357899d4 Mon Sep 17 00:00:00 2001
From: Mital Ashok
Date: Sun, 4 Aug 2024 09:09:19 +0100
Subject: [PATCH] [Clang][CodeGen] Add `[[clang::asm_dialect]]` attribute
---
cl
https://github.com/MitalAshok updated
https://github.com/llvm/llvm-project/pull/101871
>From 7f8c82071c9cc324acd7f2a79539392e74838545 Mon Sep 17 00:00:00 2001
From: Mital Ashok
Date: Sun, 4 Aug 2024 09:09:19 +0100
Subject: [PATCH] [Clang][CodeGen] Add `[[clang::asm_dialect]]` attribute
---
cl
https://github.com/MitalAshok updated
https://github.com/llvm/llvm-project/pull/101871
>From 6dd98b5c255580909a9f38baa1bbdc257e5d60d2 Mon Sep 17 00:00:00 2001
From: Mital Ashok
Date: Sun, 4 Aug 2024 09:09:19 +0100
Subject: [PATCH] [Clang][CodeGen] Add `[[clang::asm_dialect]]` attribute
---
cl
@@ -990,6 +990,9 @@ def warn_main_redefined : Warning<"variable named 'main'
with external linkage "
"has undefined behavior">, InGroup;
def ext_main_used : Extension<
"referring to 'main' within an expression is a Clang extension">,
InGroup;
+def err_invalid_linkage_
@@ -0,0 +1,29 @@
+// RUN: %clang_cc1 -fsyntax-only -verify -pedantic-errors %s
+
+namespace c {
+ extern "C" void main(); // expected-error {{invalid linkage specification
'extern "C"'}}
+}
+extern "C" {
+ int main(); // expected-error {{invalid linkage specification 'extern "C
@@ -5637,6 +5638,27 @@ static bool EvaluateUnaryTypeTrait(Sema &Self, TypeTrait
UTT,
return false;
case UTT_IsTriviallyEqualityComparable:
return isTriviallyEqualityComparableType(Self, T, KeyLoc);
+ case UTT_IsImplicitLifetime: {
+DiagnoseVLAInCXXTypeTrait(Self
@@ -5637,6 +5638,27 @@ static bool EvaluateUnaryTypeTrait(Sema &Self, TypeTrait
UTT,
return false;
case UTT_IsTriviallyEqualityComparable:
return isTriviallyEqualityComparableType(Self, T, KeyLoc);
+ case UTT_IsImplicitLifetime: {
+DiagnoseVLAInCXXTypeTrait(Self
@@ -86,6 +86,9 @@ C++23 Feature Support
C++2c Feature Support
^
+- Add ``__builtin_is_implicit_lifetime`` intrinsic, which supports
MitalAshok wrote:
Why is this called `__builtin_is_implicit_lifetime` instead of
`__is_implicit_lifetime`
@@ -5637,6 +5638,27 @@ static bool EvaluateUnaryTypeTrait(Sema &Self, TypeTrait
UTT,
return false;
case UTT_IsTriviallyEqualityComparable:
return isTriviallyEqualityComparableType(Self, T, KeyLoc);
+ case UTT_IsImplicitLifetime: {
+DiagnoseVLAInCXXTypeTrait(Self
https://github.com/MitalAshok updated
https://github.com/llvm/llvm-project/pull/101385
>From 555373715bc2eb025d6580129cead087f7f45ed1 Mon Sep 17 00:00:00 2001
From: Mital Ashok
Date: Fri, 7 Jul 2023 14:31:03 +0100
Subject: [PATCH] [Clang][SemaCXX] Fix bug where unexpanded lambda captures
where
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
@@ -12370,6 +12379,17 @@ void Sema::CheckMain(FunctionDecl* FD, const DeclSpec&
DS) {
}
}
+bool Sema::CheckLinkageSpecification(DeclContext *DC, Decl *D) {
+ // [basic.start.main] p2
+ // The main function shall not be declared with a linkage-specification.
+ if (DC->i
https://github.com/MitalAshok requested changes to this pull request.
You can put some of the tests in
`clang/test/CXX/basic/basic.start/basic.start.main/p3.cpp`
You lost the check for `extern "C++" int main() {}` at global scope. To recap:
```c++
// These are disallowed by [basic.start.main]p
@@ -7353,6 +7353,15 @@ void emitReadOnlyPlacementAttrWarning(Sema &S, const
VarDecl *VD) {
}
}
+static bool isMainVar(DeclarationName Name, VarDecl *VD) {
+ if (Name.getAsIdentifierInfo() && Name.getAsIdentifierInfo()->isStr("main")
&&
+ !VD->getDescribedVarTemplate(
@@ -3292,11 +3292,9 @@ bool FunctionDecl::isImmediateFunction() const {
}
bool FunctionDecl::isMain() const {
- const TranslationUnitDecl *tunit =
-dyn_cast(getDeclContext()->getRedeclContext());
- return tunit &&
- !tunit->getASTContext().getLangOpts().Freestand
@@ -990,6 +990,8 @@ def warn_main_redefined : Warning<"variable named 'main'
with external linkage "
"has undefined behavior">, InGroup;
def ext_main_used : Extension<
"referring to 'main' within an expression is a Clang extension">,
InGroup;
+def err_main_invalid_lin
https://github.com/MitalAshok created
https://github.com/llvm/llvm-project/pull/102030
None
>From 2763f4618c654decf262493cb90cc8b1352b1599 Mon Sep 17 00:00:00 2001
From: Mital Ashok
Date: Mon, 5 Aug 2024 19:05:59 +0100
Subject: [PATCH] [NFC] Deduplicate clang::AccessKinds to diagnostic strings
MitalAshok wrote:
Split off from #91895
CC @cor3ntin
https://github.com/llvm/llvm-project/pull/102030
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/MitalAshok converted_to_draft
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-commits
@@ -1832,6 +1832,33 @@ static ExprResult BuiltinLaunder(Sema &S, CallExpr
*TheCall) {
return TheCall;
}
+static ExprResult BuiltinIsWithinLifetime(Sema &S, CallExpr *TheCall) {
+ if (checkArgCount(S, TheCall, 1))
+return ExprError();
+
+ ExprResult Arg = S.DefaultFunc
https://github.com/MitalAshok created
https://github.com/llvm/llvm-project/pull/102044
Added a new `-Wpre-c++26-compat` warning for when this feature is used in
C++26, and a different warning for when this is used in C++11 through C++20.
>From 65f4c93a54888338ab5fe3e5b9f9f1228651eb3c Mon Sep 1
https://github.com/MitalAshok edited
https://github.com/llvm/llvm-project/pull/102044
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/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] [Clang][Sema] Backport P2741R3 (static_assert with
user-generat
https://github.com/MitalAshok ready_for_review
https://github.com/llvm/llvm-project/pull/102044
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
MitalAshok wrote:
This doesn't make sense to backport to C++98's `_Static_assert` extension (no
`constexpr` member functions)
CC @cor3ntin @AaronBallman
Re: affects on libc++/any downstream:
Other than the feature test macro, this extension should not affect any valid
C++11/20 program, since
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/3] [Clang][Sema] Backport P2741R3 (static_assert with
user-gen
https://github.com/MitalAshok edited
https://github.com/llvm/llvm-project/pull/102044
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -105,6 +105,11 @@ C2y Feature Support
C23 Feature Support
^^^
+Non-comprehensive list of changes in this release
+-
MitalAshok wrote:
https://github.com/llvm/llvm-project/commit/10c6d6349e51bb
@@ -134,7 +134,7 @@ void test() {
}
namespace cwg2798 { // cwg2798: 17
-#if __cpp_static_assert >= 202306
+#if __cplusplus > 202302L
MitalAshok wrote:
I guess this is one of the potentially-breaking changes that comes with
changing the feature test macro. I
@@ -671,10 +671,8 @@ static void InitializeCPlusPlusFeatureTestMacros(const
LangOptions &LangOpts,
LangOpts.CPlusPlus23 ? "202211L"
: LangOpts.CPlusPlus17 ? "201603L"
: "200907");
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/4] [Clang][Sema] Backport P2741R3 (static_assert with
user-gen
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/5] [Clang][Sema] Backport P2741R3 (static_assert with
user-gen
https://github.com/MitalAshok edited
https://github.com/llvm/llvm-project/pull/102044
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
301 - 400 of 470 matches
Mail list logo