From a09c5e6bde88932022ae1deeffcdfebb3e3bf6c9 Mon Sep 17 00:00:00 2001 From: Vern Paxson Date: Thu, 23 Dec 2021 11:37:17 -0800 Subject: [PATCH] fix: don't treat pseudo-identifiers in type cases as local variables --- src/script_opt/ProfileFunc.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/script_opt/ProfileFunc.cc b/src/script_opt/ProfileFunc.cc index b29bf068d4..5d6e8d8566 100644 --- a/src/script_opt/ProfileFunc.cc +++ b/src/script_opt/ProfileFunc.cc @@ -174,7 +174,11 @@ TraversalCode ProfileFunc::PreStmt(const Stmt* s) if ( 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; }