mirror of
https://github.com/zeek/zeek.git
synced 2025-10-12 19:48:20 +00:00
cleaner approach for localizing errors associated with duplicated ASTs: virtualize GetLocationInfo
This commit is contained in:
parent
c0a5328f8e
commit
eb1848c547
11 changed files with 37 additions and 33 deletions
|
@ -115,7 +115,7 @@ std::string render_call_stack()
|
|||
|
||||
if ( ci.call )
|
||||
{
|
||||
auto loc = ci.call->Original()->GetLocationInfo();
|
||||
auto loc = ci.call->GetLocationInfo();
|
||||
rval += util::fmt(" at %s:%d", loc->filename, loc->first_line);
|
||||
}
|
||||
|
||||
|
@ -385,8 +385,7 @@ ValPtr ScriptFunc::Invoke(zeek::Args* args, Frame* parent) const
|
|||
for ( const auto& body : bodies )
|
||||
{
|
||||
if ( sample_logger )
|
||||
sample_logger->LocationSeen(
|
||||
body.stmts->Original()->GetLocationInfo());
|
||||
sample_logger->LocationSeen(body.stmts->GetLocationInfo());
|
||||
|
||||
// Fill in the rest of the frame with the function's arguments.
|
||||
for ( auto j = 0u; j < args->size(); ++j )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue