File tree Expand file tree Collapse file tree 2 files changed +13
-6
lines changed
regression-tests/test-results Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ template<typename T> requires( std::is_void_v<T> )
20
20
class t<T> {public: cpp2::i32 b {2 };
21
21
};
22
22
template <typename T> extern cpp2::i32 v;// clang-format off
23
- template <> extern cpp2:: i32 v< void >; // clang-format on
23
+ // clang-format on
24
24
auto main () -> int;
25
25
26
26
Original file line number Diff line number Diff line change @@ -4885,12 +4885,19 @@ class cppfront
4885
4885
4886
4886
if (
4887
4887
printer.get_phase () == printer.phase0_type_decls
4888
+ && !n.is_namespace ()
4889
+ && !n.is_type ()
4890
+ )
4891
+ {
4892
+ return ;
4893
+ }
4894
+
4895
+ // Do not forward declare specializations.
4896
+ if (
4897
+ n.is_specialization ()
4888
4898
&& (
4889
- (
4890
- !n.is_namespace ()
4891
- && !n.is_type ()
4892
- ) ||
4893
- n.is_specialization ()
4899
+ (n.is_type () && printer.get_phase () == printer.phase0_type_decls )
4900
+ || (n.is_object () && printer.get_phase () == printer.phase1_type_defs_func_decls )
4894
4901
)
4895
4902
)
4896
4903
{
You can’t perform that action at this time.
0 commit comments