@@ -50,7 +50,7 @@ bool isMetadata(const LinearPath &path, P4::TypeMap *typeMap) {
5050 return std::all_of (path.components .begin (), path.components .end (),
5151 [&](const IR ::Expression *component) {
5252 LOG2 (" isMetadata? checking component: " << component);
53- auto * type = typeMap->getType (component);
53+ auto type = typeMap->getType (component);
5454 BUG_CHECK (type, " Couldn't find type for: %1%" , component);
5555 LOG3 (" isMetadata? type is: " << type);
5656 if (component == lastComponent) return isMetadataOrPrimitiveType (type);
@@ -65,7 +65,7 @@ std::optional<cstring> containingTnaParam(const LinearPath &linearPath, const Tn
6565 " Path-like expression tree was rooted in "
6666 " non-path expression: %1%" ,
6767 linearPath.components [0 ]);
68- auto * decl = refMap->getDeclaration (topLevelPath->path );
68+ auto decl = refMap->getDeclaration (topLevelPath->path );
6969 BUG_CHECK (decl,
7070 " No declaration for top level path in path-like "
7171 " expression: %1%" ,
@@ -96,13 +96,13 @@ void forAllTouchedFields(const LinearPath &linearPath, P4::TypeMap *typeMap, Fun
9696 BUG (" Unexpected path-like expression component: %1%" , component);
9797 }
9898
99- auto * lastComponentType = typeMap->getType (components.back ());
99+ auto lastComponentType = typeMap->getType (components.back ());
100100 BUG_CHECK (lastComponentType, " Couldn't find type for: %1%" , components.back ());
101101 if (auto *structType = lastComponentType->to <IR ::Type_StructLike>()) {
102102 fullPathStr.push_back (' .' );
103103 cstring fullPath (fullPathStr);
104- for (auto * field : structType->fields ) {
105- auto * fieldType = typeMap->getType (field);
104+ for (auto field : structType->fields ) {
105+ auto fieldType = typeMap->getType (field);
106106 BUG_CHECK (fieldType, " Couldn't find type for: %1%" , field);
107107 auto *fieldExpr = new IR::Member (fieldType, components.back (), IR::ID (field->name ));
108108 func (fullPath + field->name , fieldType, fieldExpr);
@@ -267,8 +267,8 @@ bool CollectBridgedFields::preorder(const IR::BFN::TnaDeparser *d) {
267267 return false ;
268268}
269269bool CollectBridgedFields::preorder (const IR ::P4Table *tbl) {
270- if (auto * key = tbl->getKey ()) visit (key, " key" );
271- if (auto * actions = tbl->getActionList ()) {
270+ if (auto key = tbl->getKey ()) visit (key, " key" );
271+ if (auto actions = tbl->getActionList ()) {
272272 parallel_visit (actions->actionList , " actions" );
273273 } else {
274274 BUG (" No actions in %s" , tbl);
0 commit comments