fix: don't treat pseudo-identifiers in type cases as local variables

This commit is contained in:
Vern Paxson 2021-12-23 11:37:17 -08:00
parent adb4958c73
commit a09c5e6bde

View file

@ -174,7 +174,11 @@ TraversalCode ProfileFunc::PreStmt(const Stmt* s)
if ( idl ) if ( idl )
{ {
for ( auto id : *idl ) for ( auto id : *idl )
locals.insert(id); // Make sure it's not a placeholder
// identifier, used when there's
// no explicit one.
if ( id->Name() )
locals.insert(id);
is_type_switch = true; is_type_switch = true;
} }