diff options
Diffstat (limited to 'TAO_IDL/ast/ast_visitor_reifying.cpp')
-rw-r--r-- | TAO_IDL/ast/ast_visitor_reifying.cpp | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/TAO_IDL/ast/ast_visitor_reifying.cpp b/TAO_IDL/ast/ast_visitor_reifying.cpp index 7bee77ff986..b99f4a47e5d 100644 --- a/TAO_IDL/ast/ast_visitor_reifying.cpp +++ b/TAO_IDL/ast/ast_visitor_reifying.cpp @@ -32,6 +32,8 @@ #include "utl_identifier.h" #include "utl_exprlist.h" +#include "utl_strlist.h" +#include "utl_string.h" #include "nr_extern.h" ast_visitor_reifying::ast_visitor_reifying ( @@ -521,17 +523,17 @@ ast_visitor_reifying::visit_string (AST_String *node) AST_Expression (b, AST_Expression::EV_ulong), -1); - + Identifier id ("string"); UTL_ScopedName sn (&id, 0); - + ACE_NEW_RETURN (this->reified_node_, AST_String (AST_Decl::NT_string, &sn, bound, node->width ()), -1); - + return 0; } @@ -548,7 +550,7 @@ int ast_visitor_reifying::visit_param_holder (AST_Param_Holder *node) { size_t i = 0; - FE_Utils::T_ARGLIST *t_args = + FE_Utils::T_ARGLIST const *t_args = this->ctx_->template_args (); for (FE_Utils::T_PARAMLIST_INFO::ITERATOR iter ( @@ -559,7 +561,15 @@ ast_visitor_reifying::visit_param_holder (AST_Param_Holder *node) FE_Utils::T_Param_Info *item = 0; iter.next (item); - if (item->name_ == node->info ()->name_) + ACE_CString name (item->name_); + + /// The param holder's info->name_ may be the same as the + /// node's local name, but if the node comes from an + /// alias, info->name_ will be the name of the alias's + /// referenced template module parameter, while the local + /// name will be that of the corresponding alias param + /// name, which is what we want. + if (name == node->local_name ()->get_string ()) { AST_Decl **ret_ptr = 0; @@ -588,7 +598,7 @@ ast_visitor_reifying::visit_param_holder (AST_Param_Holder *node) ACE_TEXT ("ast_visitor_reifying::") ACE_TEXT ("visit_param_holder() - no match for ") ACE_TEXT ("template param %C in %C\n"), - node->info ()->name_.c_str (), + node->local_name ()->get_string (), ScopeAsDecl (idl_global->scopes ().top ())->full_name ()), -1); } |