AMP999 wrote:
I don't know, but it seems to me that ideally the `DSC` here would be
`DSC_template_type_arg`, not just `DSC_template_arg`. Is there a way to make
that happen?
https://github.com/llvm/llvm-project/pull/81298
___
cfe-commits mailing
fahadnayyar wrote:
Filed this issue: https://github.com/llvm/llvm-project/issues/86997
https://github.com/llvm/llvm-project/pull/81298
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
fahadnayyar wrote:
@AaronBallman precisely!
`DSC` now is : `DSC_template_arg`
`DSC` in earlier clang was : `DSC_type_specifier`
@AMP999 do you have thoughts about how we can fix this issue?
https://github.com/llvm/llvm-project/pull/81298
___
AaronBallman wrote:
I think the former diagnostic is more clear. It seems the issue is around here:
https://github.com/llvm/llvm-project/blob/d7975c9d93fb4a69c0bd79d7d5b3f6be77a25c73/clang/lib/Parse/ParseDecl.cpp#L2828
We changed the `DeclSpecContext` so we hit the `else if` rather than the
fahadnayyar wrote:
Hey folks,
Because of this change the error message for certain type traits changed.
For example:
```
void f(void) {
__has_nothrow_copy();
}
```
Earlier the error message was: `expected a type`
New error message is: `type name requires a specifier or qualifier`
Ref:
https://github.com/cor3ntin closed
https://github.com/llvm/llvm-project/pull/81298
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/cor3ntin approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/81298
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
AMP999 wrote:
@cor3ntin I've reflected your suggestions in the code. Could you help me to
land this PR, if you it looks good to you?
https://github.com/llvm/llvm-project/pull/81298
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://github.com/AMP999 updated
https://github.com/llvm/llvm-project/pull/81298
>From d59c262b31937fdd2b907ec11d7f08e4a385007c Mon Sep 17 00:00:00 2001
From: Amirreza Ashouri
Date: Fri, 9 Feb 2024 21:55:03 +0330
Subject: [PATCH 1/8] [clang] Support `__is_trivially_copyable(int()&)==false`
https://github.com/AMP999 updated
https://github.com/llvm/llvm-project/pull/81298
>From d59c262b31937fdd2b907ec11d7f08e4a385007c Mon Sep 17 00:00:00 2001
From: Amirreza Ashouri
Date: Fri, 9 Feb 2024 21:55:03 +0330
Subject: [PATCH 1/7] [clang] Support `__is_trivially_copyable(int()&)==false`
https://github.com/AMP999 updated
https://github.com/llvm/llvm-project/pull/81298
>From d59c262b31937fdd2b907ec11d7f08e4a385007c Mon Sep 17 00:00:00 2001
From: Amirreza Ashouri
Date: Fri, 9 Feb 2024 21:55:03 +0330
Subject: [PATCH 1/6] [clang] Support `__is_trivially_copyable(int()&)==false`
https://github.com/AMP999 updated
https://github.com/llvm/llvm-project/pull/81298
>From d59c262b31937fdd2b907ec11d7f08e4a385007c Mon Sep 17 00:00:00 2001
From: Amirreza Ashouri
Date: Fri, 9 Feb 2024 21:55:03 +0330
Subject: [PATCH 1/5] [clang] Support `__is_trivially_copyable(int()&)==false`
https://github.com/cor3ntin edited
https://github.com/llvm/llvm-project/pull/81298
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/cor3ntin commented:
This is going to need additional tests (ie a test for
`__is_trivially_copyable(int()&)` would be a good start!)
https://github.com/llvm/llvm-project/pull/81298
___
cfe-commits mailing list
@@ -3941,7 +3943,7 @@ ExprResult Parser::ParseArrayTypeTrait() {
if (T.expectAndConsume())
return ExprError();
- TypeResult Ty = ParseTypeName();
+ TypeResult Ty = ParseTypeName(nullptr, DeclaratorContext::TemplateArg);
cor3ntin wrote:
```suggestion
@@ -3899,7 +3899,9 @@ ExprResult Parser::ParseTypeTrait() {
SmallVector Args;
do {
// Parse the next type.
-TypeResult Ty = ParseTypeName();
+TypeResult Ty = ParseTypeName(nullptr, getLangOpts().CPlusPlus
cor3ntin wrote:
```suggestion
https://github.com/AMP999 updated
https://github.com/llvm/llvm-project/pull/81298
>From d59c262b31937fdd2b907ec11d7f08e4a385007c Mon Sep 17 00:00:00 2001
From: Amirreza Ashouri
Date: Fri, 9 Feb 2024 21:55:03 +0330
Subject: [PATCH 1/5] [clang] Support `__is_trivially_copyable(int()&)==false`
https://github.com/AMP999 updated
https://github.com/llvm/llvm-project/pull/81298
>From d59c262b31937fdd2b907ec11d7f08e4a385007c Mon Sep 17 00:00:00 2001
From: Amirreza Ashouri
Date: Fri, 9 Feb 2024 21:55:03 +0330
Subject: [PATCH 1/5] [clang] Support `__is_trivially_copyable(int()&)==false`
https://github.com/efriedma-quic updated
https://github.com/llvm/llvm-project/pull/81298
>From d59c262b31937fdd2b907ec11d7f08e4a385007c Mon Sep 17 00:00:00 2001
From: Amirreza Ashouri
Date: Fri, 9 Feb 2024 21:55:03 +0330
Subject: [PATCH 1/4] [clang] Support
https://github.com/AMP999 updated
https://github.com/llvm/llvm-project/pull/81298
>From d59c262b31937fdd2b907ec11d7f08e4a385007c Mon Sep 17 00:00:00 2001
From: Amirreza Ashouri
Date: Fri, 9 Feb 2024 21:55:03 +0330
Subject: [PATCH 1/3] [clang] Support `__is_trivially_copyable(int()&)==false`
@@ -57,7 +57,7 @@ UNION(char[2], short) u2 = { .one = { 'a', 'b' } }; //
ext-warning 3 {{'_Static_
typedef UNION(char, short) U3; // expected-error {{static assertion failed due
to requirement 'sizeof(char) == sizeof(short)': type size mismatch}} \
@@ -57,7 +57,7 @@ UNION(char[2], short) u2 = { .one = { 'a', 'b' } }; //
ext-warning 3 {{'_Static_
typedef UNION(char, short) U3; // expected-error {{static assertion failed due
to requirement 'sizeof(char) == sizeof(short)': type size mismatch}} \
https://github.com/erichkeane commented:
This would need a release note + I think it needs better testing.
@AaronBallman might wish to take a look as well, this is his code ownership.
https://github.com/llvm/llvm-project/pull/81298
___
cfe-commits
https://github.com/erichkeane edited
https://github.com/llvm/llvm-project/pull/81298
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/AMP999 updated
https://github.com/llvm/llvm-project/pull/81298
>From d59c262b31937fdd2b907ec11d7f08e4a385007c Mon Sep 17 00:00:00 2001
From: Amirreza Ashouri
Date: Fri, 9 Feb 2024 21:55:03 +0330
Subject: [PATCH 1/2] [clang] Support `__is_trivially_copyable(int()&)==false`
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Amirreza Ashouri (AMP999)
Changes
IMHO it would be productive to make a similar change for `typeid`, in
`ParseCXXTypeid`, in order to improve Clang's error message for
https://godbolt.org/z/oKKWxeYra
But that might be better done by
26 matches
Mail list logo