@@ -2590,8 +2590,14 @@ def err_auto_non_deduced_not_alone : Error<
def err_implied_std_initializer_list_not_found : Error<
"cannot deduce type of initializer list because std::initializer_list was "
"not found; include ">;
-def err_malformed_std_initializer_list : Error<
-
https://github.com/zwuis approved this pull request.
https://github.com/llvm/llvm-project/pull/133822
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -12155,16 +12185,16 @@ static ClassTemplateDecl
*LookupStdInitializerList(Sema &S, SourceLocation Loc){
Result.suppressDiagnostics();
// We found something weird. Complain about the first thing we found.
NamedDecl *Found = *Result.begin();
-S.Diag(Found->get
@@ -0,0 +1,77 @@
+// RUN: %clang_cc1 %s -verify=expected,type-param -std=c++23 -DTYPE_PARAM
+// RUN: %clang_cc1 %s -verify=expected,others -std=c++23 -DCONSTANT_PARAM
+// RUN: %clang_cc1 %s -verify=expected,others -std=c++23 -DTYPE_TEMPLATE_PARAM
+// RUN: %clang_cc1 %s -verify=exp
https://github.com/offsetof updated
https://github.com/llvm/llvm-project/pull/133822
>From b5798e04281fb6d9475a1ae6af8b94bc0ed85a43 Mon Sep 17 00:00:00 2001
From: offsetof
Date: Mon, 31 Mar 2025 23:17:47 +
Subject: [PATCH 1/2] [clang] Check `std::initializer_list` more strictly
Require `st
@@ -12071,6 +12071,37 @@ NamespaceDecl *Sema::getOrCreateStdNamespace() {
return getStdNamespace();
}
+/// Check that the template-head of this class template is acceptable for
+/// a declaration of 'std::initializer_list', and optionally diagnose if
+/// it is not.
+/// \re
@@ -12071,6 +12071,37 @@ NamespaceDecl *Sema::getOrCreateStdNamespace() {
return getStdNamespace();
}
+/// Check that the template-head of this class template is acceptable for
+/// a declaration of 'std::initializer_list', and optionally diagnose if
+/// it is not.
+/// \re
@@ -12071,6 +12071,37 @@ NamespaceDecl *Sema::getOrCreateStdNamespace() {
return getStdNamespace();
}
+/// Check that the template-head of this class template is acceptable for
+/// a declaration of 'std::initializer_list', and optionally diagnose if
+/// it is not.
+/// \re
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: None (offsetof)
Changes
Require `std::initializer_list` to be a class template with a template-head
equivalent to `template` and no default arguments.
---
Full diff: https://github.com/llvm/llvm-project/pull/133822.diff
3 Files A
https://github.com/offsetof created
https://github.com/llvm/llvm-project/pull/133822
Require `std::initializer_list` to be a class template with a template-head
equivalent to `template` and no default arguments.
>From b5798e04281fb6d9475a1ae6af8b94bc0ed85a43 Mon Sep 17 00:00:00 2001
From: offs
10 matches
Mail list logo