https://github.com/Endilll closed
https://github.com/llvm/llvm-project/pull/92295
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/shafik approved this pull request.
https://github.com/llvm/llvm-project/pull/92295
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Endilll updated
https://github.com/llvm/llvm-project/pull/92295
>From a0d5a234431f3db2f0283ffa0909bf8c254aa611 Mon Sep 17 00:00:00 2001
From: Vlad Serebrennikov
Date: Wed, 15 May 2024 20:20:43 +0300
Subject: [PATCH 1/9] [clang] Implement CWG2428 "Deprecating a concept"
---
@@ -167,9 +167,11 @@ Parser::DeclGroupPtrTy
Parser::ParseTemplateDeclarationOrSpecialization(
LastParamListWasEmpty);
// Parse the actual template declaration.
- if (Tok.is(tok::kw_concept))
-return Actions.ConvertDeclToDeclGroup(
-
https://github.com/Endilll updated
https://github.com/llvm/llvm-project/pull/92295
>From a0d5a234431f3db2f0283ffa0909bf8c254aa611 Mon Sep 17 00:00:00 2001
From: Vlad Serebrennikov
Date: Wed, 15 May 2024 20:20:43 +0300
Subject: [PATCH 1/8] [clang] Implement CWG2428 "Deprecating a concept"
---
@@ -167,9 +167,11 @@ Parser::DeclGroupPtrTy
Parser::ParseTemplateDeclarationOrSpecialization(
LastParamListWasEmpty);
// Parse the actual template declaration.
- if (Tok.is(tok::kw_concept))
-return Actions.ConvertDeclToDeclGroup(
-
https://github.com/cor3ntin approved this pull request.
LGTM, thanks!
https://github.com/llvm/llvm-project/pull/92295
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -45,6 +45,34 @@ void fallthrough(int n) {
#endif
}
+namespace cwg2428 { // cwg2428: 19
+#if __cplusplus >= 202002L
+template
+concept C [[deprecated]] = true; // #C
Endilll wrote:
(MSVC spelling was removed.)
https://github.com/llvm/llvm-project/pull/922
https://github.com/erichkeane approved this pull request.
https://github.com/llvm/llvm-project/pull/92295
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -8092,6 +8092,18 @@ void Sema::checkCall(NamedDecl *FDecl, const
FunctionProtoType *Proto,
diagnoseArgDependentDiagnoseIfAttrs(FD, ThisArg, Args, Loc);
}
+void Sema::CheckConstrainedAuto(TypeSourceInfo *TS) {
+ if (getLangOpts().CPlusPlus20) {
Endilll
@@ -8092,6 +8092,18 @@ void Sema::checkCall(NamedDecl *FDecl, const
FunctionProtoType *Proto,
diagnoseArgDependentDiagnoseIfAttrs(FD, ThisArg, Args, Loc);
}
+void Sema::CheckConstrainedAuto(TypeSourceInfo *TS) {
+ if (getLangOpts().CPlusPlus20) {
+if (const AutoType
https://github.com/Endilll updated
https://github.com/llvm/llvm-project/pull/92295
>From a0d5a234431f3db2f0283ffa0909bf8c254aa611 Mon Sep 17 00:00:00 2001
From: Vlad Serebrennikov
Date: Wed, 15 May 2024 20:20:43 +0300
Subject: [PATCH 1/7] [clang] Implement CWG2428 "Deprecating a concept"
---
https://github.com/Endilll updated
https://github.com/llvm/llvm-project/pull/92295
>From a0d5a234431f3db2f0283ffa0909bf8c254aa611 Mon Sep 17 00:00:00 2001
From: Vlad Serebrennikov
Date: Wed, 15 May 2024 20:20:43 +0300
Subject: [PATCH 1/6] [clang] Implement CWG2428 "Deprecating a concept"
---
https://github.com/Endilll edited
https://github.com/llvm/llvm-project/pull/92295
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -316,7 +318,8 @@ Parser::ParseConceptDefinition(const ParsedTemplateInfo
&TemplateInfo,
const IdentifierInfo *Id = Result.Identifier;
SourceLocation IdLoc = Result.getBeginLoc();
- DiagnoseAndSkipCXX11Attributes();
+ ParsedAttributes Attrs(AttrFactory);
+ MaybeParse
@@ -8092,6 +8092,18 @@ void Sema::checkCall(NamedDecl *FDecl, const
FunctionProtoType *Proto,
diagnoseArgDependentDiagnoseIfAttrs(FD, ThisArg, Args, Loc);
}
+void Sema::CheckConstrainedAuto(TypeSourceInfo *TS) {
+ if (getLangOpts().CPlusPlus20) {
cor3nti
@@ -8092,6 +8092,18 @@ void Sema::checkCall(NamedDecl *FDecl, const
FunctionProtoType *Proto,
diagnoseArgDependentDiagnoseIfAttrs(FD, ThisArg, Args, Loc);
}
+void Sema::CheckConstrainedAuto(TypeSourceInfo *TS) {
+ if (getLangOpts().CPlusPlus20) {
+if (const AutoType
@@ -316,7 +318,8 @@ Parser::ParseConceptDefinition(const ParsedTemplateInfo
&TemplateInfo,
const IdentifierInfo *Id = Result.Identifier;
SourceLocation IdLoc = Result.getBeginLoc();
- DiagnoseAndSkipCXX11Attributes();
+ ParsedAttributes Attrs(AttrFactory);
+ MaybeParse
@@ -45,6 +45,34 @@ void fallthrough(int n) {
#endif
}
+namespace cwg2428 { // cwg2428: 19
+#if __cplusplus >= 202002L
+template
+concept C [[deprecated]] = true; // #C
Endilll wrote:
I added support for GNU and MSVC spellings.
https://github.com/llvm/llvm-p
https://github.com/Endilll updated
https://github.com/llvm/llvm-project/pull/92295
>From a0d5a234431f3db2f0283ffa0909bf8c254aa611 Mon Sep 17 00:00:00 2001
From: Vlad Serebrennikov
Date: Wed, 15 May 2024 20:20:43 +0300
Subject: [PATCH 1/5] [clang] Implement CWG2428 "Deprecating a concept"
---
https://github.com/Endilll updated
https://github.com/llvm/llvm-project/pull/92295
>From a0d5a234431f3db2f0283ffa0909bf8c254aa611 Mon Sep 17 00:00:00 2001
From: Vlad Serebrennikov
Date: Wed, 15 May 2024 20:20:43 +0300
Subject: [PATCH 1/4] [clang] Implement CWG2428 "Deprecating a concept"
---
@@ -45,6 +45,34 @@ void fallthrough(int n) {
#endif
}
+namespace cwg2428 { // cwg2428: 19
+#if __cplusplus >= 202002L
+template
+concept C [[deprecated]] = true; // #C
Endilll wrote:
Non-standard spellings of this attribute are out of scope of the Core issue
@@ -45,6 +45,38 @@ void fallthrough(int n) {
#endif
}
+namespace cwg2428 { // cwg2428: 19
+#if __cplusplus >= 202002L
+template
+concept C [[deprecated]] = true; // #cwg2428-C
+
+template
+[[deprecated]] concept C2 = true;
+// expected-error@-1 {{expected unqualified-id}}
+
https://github.com/Endilll updated
https://github.com/llvm/llvm-project/pull/92295
>From a0d5a234431f3db2f0283ffa0909bf8c254aa611 Mon Sep 17 00:00:00 2001
From: Vlad Serebrennikov
Date: Wed, 15 May 2024 20:20:43 +0300
Subject: [PATCH 1/3] [clang] Implement CWG2428 "Deprecating a concept"
---
https://github.com/cor3ntin edited
https://github.com/llvm/llvm-project/pull/92295
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -45,6 +45,34 @@ void fallthrough(int n) {
#endif
}
+namespace cwg2428 { // cwg2428: 19
+#if __cplusplus >= 202002L
+template
+concept C [[deprecated]] = true; // #C
cor3ntin wrote:
As it turns out, GCC does support GNU-style attributes
https://compiler-e
https://github.com/cor3ntin edited
https://github.com/llvm/llvm-project/pull/92295
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/cor3ntin edited
https://github.com/llvm/llvm-project/pull/92295
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -45,6 +45,34 @@ void fallthrough(int n) {
#endif
}
+namespace cwg2428 { // cwg2428: 19
+#if __cplusplus >= 202002L
+template
+concept C [[deprecated]] = true; // #C
cor3ntin wrote:
`concept C __attribute__((deprecated)) = true; ` should be ill-formed. tha
@@ -45,6 +45,38 @@ void fallthrough(int n) {
#endif
}
+namespace cwg2428 { // cwg2428: 19
+#if __cplusplus >= 202002L
+template
+concept C [[deprecated]] = true; // #cwg2428-C
+
+template
+[[deprecated]] concept C2 = true;
+// expected-error@-1 {{expected unqualified-id}}
+
@@ -45,6 +45,34 @@ void fallthrough(int n) {
#endif
}
+namespace cwg2428 { // cwg2428: 19
+#if __cplusplus >= 202002L
+template
+concept C [[deprecated]] = true; // #C
Endilll wrote:
I added test with alternative attribute placing.
> It would also be good t
@@ -10698,7 +10698,7 @@ C++ defect report implementation
status
https://cplusplus.github.io/CWG/issues/1815.html";>1815
CD4
Lifetime extension in aggregate initialization
-Clang 19
+Yes
Endilll wrote:
I updated the branch from `main`, now
https://github.com/Endilll updated
https://github.com/llvm/llvm-project/pull/92295
>From a0d5a234431f3db2f0283ffa0909bf8c254aa611 Mon Sep 17 00:00:00 2001
From: Vlad Serebrennikov
Date: Wed, 15 May 2024 20:20:43 +0300
Subject: [PATCH 1/2] [clang] Implement CWG2428 "Deprecating a concept"
---
@@ -10698,7 +10698,7 @@ C++ defect report implementation
status
https://cplusplus.github.io/CWG/issues/1815.html";>1815
CD4
Lifetime extension in aggregate initialization
-Clang 19
+Yes
AaronBallman wrote:
It's usually better to apply the
https://github.com/Endilll edited
https://github.com/llvm/llvm-project/pull/92295
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -10698,7 +10698,7 @@ C++ defect report implementation
status
https://cplusplus.github.io/CWG/issues/1815.html";>1815
CD4
Lifetime extension in aggregate initialization
-Clang 19
+Yes
Endilll wrote:
This particular one is an unfortunate
@@ -45,6 +45,34 @@ void fallthrough(int n) {
#endif
}
+namespace cwg2428 { // cwg2428: 19
+#if __cplusplus >= 202002L
+template
+concept C [[deprecated]] = true; // #C
AaronBallman wrote:
I'd like an additional test for rejecting:
```
template
[[deprecated]
@@ -10698,7 +10698,7 @@ C++ defect report implementation
status
https://cplusplus.github.io/CWG/issues/1815.html";>1815
CD4
Lifetime extension in aggregate initialization
-Clang 19
+Yes
AaronBallman wrote:
Unrelated changes snuck in.
http
https://github.com/AaronBallman commented:
Please be sure to add a release note about implementing the DR.
https://github.com/llvm/llvm-project/pull/92295
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/li
https://github.com/AaronBallman edited
https://github.com/llvm/llvm-project/pull/92295
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Vlad Serebrennikov (Endilll)
Changes
This patch allows attributes to be attached to C++20 concepts, implementing
[CWG2428](https://cplusplus.github.io/CWG/issues/2428.html).
---
Full diff: https://github.com/llvm/llvm-project/pull/92295.d
https://github.com/Endilll created
https://github.com/llvm/llvm-project/pull/92295
This patch allows attributes to be attached to C++20 concepts, implementing
[CWG2428](https://cplusplus.github.io/CWG/issues/2428.html).
>From a0d5a234431f3db2f0283ffa0909bf8c254aa611 Mon Sep 17 00:00:00 2001
Fr
42 matches
Mail list logo