mirror of
https://github.com/zeek/zeek.git
synced 2025-10-10 10:38:20 +00:00
simpler and more robust identification of function parameters for AST profiling
This commit is contained in:
parent
691a4003b7
commit
2477213619
4 changed files with 27 additions and 38 deletions
11
src/ID.cc
11
src/ID.cc
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue