simpler and more robust identification of function parameters for AST profiling

This commit is contained in:
Vern Paxson 2024-08-15 13:02:09 -07:00 committed by Arne Welzel
parent 691a4003b7
commit 2477213619
4 changed files with 27 additions and 38 deletions

View file

@ -100,20 +100,15 @@ ID::ID(const char* arg_name, IDScope arg_scope, bool arg_is_export) {
name = util::copy_string(arg_name);
scope = arg_scope;
is_export = arg_is_export;
is_option = false;
is_blank = name && extract_var_name(name) == "_";
is_const = false;
is_enum_const = false;
is_type = false;
offset = 0;
if ( is_blank )
if ( name && extract_var_name(name) == "_" ) {
is_blank = true;
SetType(base_type(TYPE_ANY));
}
opt_info = new IDOptInfo(this);
infer_return_type = false;
SetLocationInfo(&start_location, &end_location);
}