FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix: using statement in another namespace that pointer to type alias by HungMingWu · Pull Request #1286 · hsutter/cppfront · GitHub

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .h  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
9 changes: 5 additions & 4 deletions source/to_cpp1.h
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -5685,10 +5685,11 @@ class cppfront
return;
}

// In phase 0, only need to consider namespaces and types
// In phase 0, only need to consider alias, namespaces and types

if (
printer.get_phase() == printer.phase0_type_decls
&& !n.is_alias()
&& !n.is_namespace()
&& !n.is_type()
)
Expand Down Expand Up @@ -5718,13 +5719,13 @@ class cppfront
auto& a = std::get<declaration_node::an_alias>(n.type);
assert(a);

// Namespace-scope aliases are emitted in phase 1,
// Namespace-scope aliases are emitted in phase 0,
// type-scope object aliases in both phases 1 and 2, and
// function-scope aliases in phase 2
if (
(
!n.parent_is_function()
&& printer.get_phase() == printer.phase1_type_defs_func_decls
&& printer.get_phase() == printer.phase0_type_decls
)
||
(
Expand Down Expand Up @@ -6056,7 +6057,7 @@ class cppfront

// Now, emit our own template parameters
if (
n.template_parameters
(n.template_parameters && !n.is_alias())
&& (
printer.get_phase() < printer.phase2_func_defs
|| n.is_object()
Expand Down

Back | FazBrowse Home | New Git URL