File tree Expand file tree Collapse file tree 4 files changed +15
-9
lines changed Expand file tree Collapse file tree 4 files changed +15
-9
lines changed Original file line number Diff line number Diff line change @@ -505,9 +505,8 @@ Improvements to Clang's diagnostics
505505- ``-Wreserved-identifier `` now fires on reserved parameter names in a function
506506 declaration which is not a definition.
507507
508- - The compatibility diagnostic for implicit ``typename `` before a dependent type
509- name is now correctly part of ``-Wpre-c++20-compat `` rather than
510- ``-Wc++20-compat ``. (#GH138775)
508+ - Several compatibility diagnostics that were incorrectly being grouped under
509+ ``-Wpre-c++20-compat `` are now part of ``-Wc++20-compat ``. (#GH138775)
511510
512511Improvements to Clang's time-trace
513512----------------------------------
Original file line number Diff line number Diff line change @@ -132,7 +132,7 @@ def err_enum_template : Error<"enumeration cannot be a template">;
132132
133133def warn_cxx20_compat_consteval : Warning<
134134 "'consteval' specifier is incompatible with C++ standards before C++20">,
135- InGroup<CXX20Compat >, DefaultIgnore;
135+ InGroup<CXXPre20Compat >, DefaultIgnore;
136136def warn_missing_type_specifier : Warning<
137137 "type specifier missing, defaults to 'int'">,
138138 InGroup<ImplicitInt>, DefaultIgnore;
Original file line number Diff line number Diff line change @@ -9568,7 +9568,7 @@ def err_incomplete_type_used_in_type_trait_expr : Error<
95689568// C++20 constinit and require_constant_initialization attribute
95699569def warn_cxx20_compat_constinit : Warning<
95709570 "'constinit' specifier is incompatible with C++ standards before C++20">,
9571- InGroup<CXX20Compat >, DefaultIgnore;
9571+ InGroup<CXXPre20Compat >, DefaultIgnore;
95729572def err_constinit_local_variable : Error<
95739573 "local variable cannot be declared 'constinit'">;
95749574def err_require_constant_init_failed : Error<
Original file line number Diff line number Diff line change 11// RUN: %clang_cc1 -std=c++17 -fsyntax-only -verify=cxx17 %s
2- // RUN: %clang_cc1 -std=c++20 -fsyntax-only -verify=cxx20 -Wpre-c++20-compat %s
2+ // RUN: %clang_cc1 -std=c++20 -fsyntax-only -verify=pre-cxx20-compat -Wpre-c++20-compat %s
3+ // RUN: %clang_cc1 -std=c++20 -fsyntax-only -verify=cxx20-compat -Wc++20-compat %s
4+ // cxx20-compat-no-diagnostics
35
4- // cxx17-error@+3 {{unknown type name 'consteval'; did you mean 'constexpr'}}
5- // cxx17-warning@+2 {{missing 'typename' prior to dependent type name 'T::type' is a C++20 extension}}
6- // cxx20-warning@+1 {{missing 'typename' prior to dependent type name 'T::type' is incompatible with C++ standards before C++20}}
6+ // cxx17-error@+4 {{unknown type name 'consteval'; did you mean 'constexpr'}}
7+ // cxx17-warning@+3 {{missing 'typename' prior to dependent type name 'T::type' is a C++20 extension}}
8+ // pre-cxx20-compat-warning@+2 {{'consteval' specifier is incompatible with C++ standards before C++20}}
9+ // pre-cxx20-compat-warning@+1 {{missing 'typename' prior to dependent type name 'T::type' is incompatible with C++ standards before C++20}}
710template <typename T> consteval T::type f ();
11+
12+ // cxx17-error@+2 {{unknown type name 'constinit'}}
13+ // pre-cxx20-compat-warning@+1 {{'constinit' specifier is incompatible with C++ standards before C++20}}
14+ constinit int x = 4 ;
You can’t perform that action at this time.
0 commit comments