File tree 6 files changed +135
-99
lines changed
regression-tests/test-results
6 files changed +135
-99
lines changed Original file line number Diff line number Diff line change 1
1
2
- cppfront compiler v0.3.0 Build 8B19:0904
2
+ cppfront compiler v0.3.0 Build 8B19:1018
3
3
Copyright(c) Herb Sutter All rights reserved
4
4
5
5
SPDX-License-Identifier: CC-BY-NC-ND-4.0
Original file line number Diff line number Diff line change 1
- "8B19:0904 "
1
+ "8B19:1018 "
Original file line number Diff line number Diff line change @@ -2850,6 +2850,23 @@ struct declaration_node
2850
2850
{ return !parent_declaration || parent_declaration->type .index () == a_namespace; }
2851
2851
auto parent_is_alias () const -> bool
2852
2852
{ return parent_declaration && parent_declaration->type .index () == an_alias; }
2853
+
2854
+ auto parent_is_type_alias () const -> bool
2855
+ { return parent_declaration && parent_declaration->is_alias () && std::get<an_alias>(parent_declaration->type )->is_type_alias (); }
2856
+ auto parent_is_namespace_alias () const -> bool
2857
+ { return parent_declaration && parent_declaration->is_alias () && std::get<an_alias>(parent_declaration->type )->is_namespace_alias (); }
2858
+ auto parent_is_object_alias () const -> bool
2859
+ { return parent_declaration && parent_declaration->is_alias () && std::get<an_alias>(parent_declaration->type )->is_object_alias (); }
2860
+
2861
+ auto is_inside_global_unnamed_function () const -> bool {
2862
+ auto parent = parent_declaration;
2863
+ // Get outside all nested function expressions
2864
+ while (parent && parent->is_function () && !parent->has_name ()) {
2865
+ parent = parent->parent_declaration ;
2866
+ }
2867
+ return !parent;
2868
+ }
2869
+
2853
2870
auto parent_is_polymorphic () const -> bool
2854
2871
{ return parent_declaration && parent_declaration->is_polymorphic (); }
2855
2872
You can’t perform that action at this time.
0 commit comments