# HG changeset patch # User John W. Eaton # Date 1290022697 18000 # Node ID c78247b664fc7f11422b0e0104377e843c8fce9f # Parent 4a84b9547f260070c2f86f61e9d46240565fc1b3 allow private functions to find private functions diff --git a/src/ChangeLog b/src/ChangeLog --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2010-11-17 John W. Eaton + + * pt-fcn-handle.cc (tree_anon_fcn_handle::rvalue1): Also stash + the directory name of the parent function in the newly created + anonymous function. Bug #31484. + 2010-11-17 John W. Eaton * oct-parse.yy (parse_fcn_file): Protect and set global_command diff --git a/src/pt-fcn-handle.cc b/src/pt-fcn-handle.cc --- a/src/pt-fcn-handle.cc +++ b/src/pt-fcn-handle.cc @@ -112,7 +112,11 @@ if (curr_fcn) { + // FIXME -- maybe it would be better to just stash curr_fcn + // instead of individual bits of info about it? + uf->stash_parent_fcn_name (curr_fcn->name ()); + uf->stash_dir_name (curr_fcn->dir_name ()); symbol_table::scope_id parent_scope = curr_fcn->parent_fcn_scope (); diff --git a/src/symtab.cc b/src/symtab.cc --- a/src/symtab.cc +++ b/src/symtab.cc @@ -613,6 +613,12 @@ { if (curr_fcn) { + // FIXME -- maybe it would be better if we could just get + // a pointer to the parent function so we would have + // access to all info about it instead of only being able + // to query the current function for specific bits of info + // about its parent function? + scope_id pscope = curr_fcn->parent_fcn_scope (); if (pscope > 0)