From a095ef1453435d7c9496e6353b98a40151c56d71 Mon Sep 17 00:00:00 2001 From: David Deharbe Date: Tue, 30 Dec 2025 15:50:39 +0000 Subject: [PATCH] Handle unused local variables [#80199] B type checking may accept unused local variables in implementations. The ibxml/poxml stages use the Unused_Id name for the corresponding XML elements. BAST is updated to ignore such elements when reading XML input. --- src/substReader.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/substReader.cpp b/src/substReader.cpp index 9a97127..1c0ad1b 100644 --- a/src/substReader.cpp +++ b/src/substReader.cpp @@ -206,8 +206,8 @@ Subst readSubstitution(const tinyxml2::XMLElement *dom, throw SubstReaderException( "Missing child 'Variables' in 'ANY_Sub' element."); std::vector vec; - for (const tinyxml2::XMLElement *ce = vars->FirstChildElement(); - ce != nullptr; ce = ce->NextSiblingElement()) { + for (const tinyxml2::XMLElement *ce = vars->FirstChildElement("Id"); + ce != nullptr; ce = ce->NextSiblingElement("Id")) { vec.push_back(VarNameFromId(ce, typeInfos)); } const tinyxml2::XMLElement *pred = dom->FirstChildElement("Pred");