static void ada_add_all_symbols (std::vector<struct block_symbol> &,
const struct block *,
const lookup_name_info &lookup_name,
- domain_search_flags, int, int *);
+ domain_search_flags, bool, bool *);
static bool is_nonfunction (const std::vector<struct block_symbol> &);
lookup_name_info decl_lookup_name (r_name,
lookup_name.match_type ());
ada_add_all_symbols (result, block, decl_lookup_name, domain,
- 1, NULL);
+ true, nullptr);
}
}
}
}
/* Find symbols in DOMAIN matching LOOKUP_NAME, in BLOCK and, if
- FULL_SEARCH is non-zero, enclosing scope and in global scopes,
+ FULL_SEARCH is true, enclosing scope and in global scopes,
returning the number of matches. Add these to RESULT.
- When FULL_SEARCH is non-zero, any non-function/non-enumeral
+ When FULL_SEARCH is true, any non-function/non-enumeral
symbol match within the nest of blocks whose innermost member is BLOCK,
is the one match returned (no other matches in that or
enclosing blocks is returned). If there are any matches in or
const struct block *block,
const lookup_name_info &lookup_name,
domain_search_flags domain,
- int full_search,
- int *made_global_lookup_p)
+ bool full_search,
+ bool *made_global_lookup_p)
{
struct symbol *sym;
- if (made_global_lookup_p)
- *made_global_lookup_p = 0;
+ if (made_global_lookup_p != nullptr)
+ *made_global_lookup_p = false;
/* Special case: If the user specifies a symbol name inside package
Standard, do a non-wild matching of the symbol name without
return;
}
- if (made_global_lookup_p)
- *made_global_lookup_p = 1;
+ if (made_global_lookup_p != nullptr)
+ *made_global_lookup_p = true;
/* Search symbols from all global blocks. */
}
/* Find symbols in DOMAIN matching LOOKUP_NAME, in BLOCK and, if FULL_SEARCH
- is non-zero, enclosing scope and in global scopes.
+ is true, enclosing scope and in global scopes.
Returns (SYM,BLOCK) tuples, indicating the symbols found and the
blocks and symbol tables (if any) in which they were found.
- When full_search is non-zero, any non-function/non-enumeral
+ When FULL_SEARCH is true, any non-function/non-enumeral
symbol match within the nest of blocks whose innermost member is BLOCK,
is the one match returned (no other matches in that or
enclosing blocks is returned). If there are any matches in or
ada_lookup_symbol_list_worker (const lookup_name_info &lookup_name,
const struct block *block,
domain_search_flags domain,
- int full_search)
+ bool full_search)
{
- int syms_from_global_search;
+ bool syms_from_global_search;
std::vector<struct block_symbol> results;
ada_add_all_symbols (results, block, lookup_name,
symbol_name_match_type name_match_type = name_match_type_from_name (name);
lookup_name_info lookup_name (name, name_match_type);
- return ada_lookup_symbol_list_worker (lookup_name, block, domain, 1);
+ return ada_lookup_symbol_list_worker (lookup_name, block, domain, true);
}
/* The result is as for ada_lookup_symbol_list with FULL_SEARCH set
- to 1, but choosing the first symbol found if there are multiple
+ to true, but choosing the first symbol found if there are multiple
choices. */
block_symbol
std::vector<struct block_symbol> syms
= ada_lookup_symbol_list_worker (lookup_name,
get_selected_block (0),
- SEARCH_VFT, 1);
+ SEARCH_VFT, true);
if (syms.size () != 1)
{
for_each_symbol_callback_ftype callback) const override
{
std::vector<struct block_symbol> results
- = ada_lookup_symbol_list_worker (name, block, domain, 0);
+ = ada_lookup_symbol_list_worker (name, block, domain, false);
for (block_symbol &sym : results)
callback (&sym);
}