Internals: cppcheck cleanups

This commit is contained in:
Wilson Snyder 2026-01-17 23:18:09 -05:00
parent cedf000a66
commit 50b6954cfc
17 changed files with 37 additions and 35 deletions

View File

@ -433,6 +433,7 @@ bool VlRandomizer::next(VlRNG& rngr) {
} }
os << "(check-sat)\n"; os << "(check-sat)\n";
sat = parseSolution(os, true); sat = parseSolution(os, true);
(void)sat;
os << "(reset)\n"; os << "(reset)\n";
return false; return false;
} }
@ -442,6 +443,7 @@ bool VlRandomizer::next(VlRNG& rngr) {
os << ")\n"; os << ")\n";
os << "\n(check-sat)\n"; os << "\n(check-sat)\n";
sat = parseSolution(os, false); sat = parseSolution(os, false);
(void)sat;
} }
os << "(reset)\n"; os << "(reset)\n";

View File

@ -2739,7 +2739,6 @@ void vl_vpi_get_value(const VerilatedVpioVarBase* vop, p_vpi_value valuep) {
|| (vop->varp()->isForceable() && (!forceEnableSignalVop || !forceValueSignalVop)))) { || (vop->varp()->isForceable() && (!forceEnableSignalVop || !forceValueSignalVop)))) {
// Check if getForceControlSignals provided any additional error info // Check if getForceControlSignals provided any additional error info
t_vpi_error_info getForceControlSignalsError{};
const bool gotErrorMessage = vpi_chk_error(&getForceControlSignalsError); const bool gotErrorMessage = vpi_chk_error(&getForceControlSignalsError);
const std::string previousErrorMessage const std::string previousErrorMessage
= gotErrorMessage = gotErrorMessage
@ -2982,7 +2981,7 @@ vpiHandle vpi_put_value(vpiHandle object, p_vpi_value valuep, p_vpi_time /*time_
const VerilatedVpioVar* const forceEnableSignalVop = forceControlSignals.first.get(); const VerilatedVpioVar* const forceEnableSignalVop = forceControlSignals.first.get();
const VerilatedVpioVar* const forceValueSignalVop = forceControlSignals.second.get(); const VerilatedVpioVar* const forceValueSignalVop = forceControlSignals.second.get();
t_vpi_error_info getForceControlSignalsError{}; t_vpi_error_info getForceControlSignalsError{};
const bool errorOccurred = vpi_chk_error(&getForceControlSignalsError); bool errorOccurred = vpi_chk_error(&getForceControlSignalsError);
// LCOV_EXCL_START - Cannot test, since getForceControlSignals does not (currently) produce // LCOV_EXCL_START - Cannot test, since getForceControlSignals does not (currently) produce
// any notices or warnings. // any notices or warnings.
if (errorOccurred && getForceControlSignalsError.level < vpiError) { if (errorOccurred && getForceControlSignalsError.level < vpiError) {
@ -2995,7 +2994,6 @@ vpiHandle vpi_put_value(vpiHandle object, p_vpi_value valuep, p_vpi_time /*time_
&& (!forceEnableSignalVop || !forceValueSignalVop))) { && (!forceEnableSignalVop || !forceValueSignalVop))) {
// Check if getForceControlSignals provided any additional error info // Check if getForceControlSignals provided any additional error info
t_vpi_error_info getForceControlSignalsError{};
const bool gotErrorMessage = vpi_chk_error(&getForceControlSignalsError); const bool gotErrorMessage = vpi_chk_error(&getForceControlSignalsError);
const std::string previousErrorMessage const std::string previousErrorMessage
= gotErrorMessage = gotErrorMessage
@ -3028,7 +3026,7 @@ vpiHandle vpi_put_value(vpiHandle object, p_vpi_value valuep, p_vpi_time /*time_
vl_vpi_get_value(baseSignalVop, valuep); vl_vpi_get_value(baseSignalVop, valuep);
t_vpi_error_info baseValueGetError{}; t_vpi_error_info baseValueGetError{};
const bool errorOccurred = vpi_chk_error(&baseValueGetError); errorOccurred = vpi_chk_error(&baseValueGetError);
// LCOV_EXCL_START - Cannot test, because missing signal would already trigger error // LCOV_EXCL_START - Cannot test, because missing signal would already trigger error
// earlier, at the getForceControlSignals stage // earlier, at the getForceControlSignals stage
// NOLINTNEXTLINE(readability-simplify-boolean-expr); // NOLINTNEXTLINE(readability-simplify-boolean-expr);

View File

@ -158,7 +158,7 @@ private:
// It has to be converted to a list of ModportClockingVarRefs, // It has to be converted to a list of ModportClockingVarRefs,
// because clocking blocks are removed in this pass // because clocking blocks are removed in this pass
for (AstNode* itemp = nodep->clockingp()->itemsp(); itemp; itemp = itemp->nextp()) { for (AstNode* itemp = nodep->clockingp()->itemsp(); itemp; itemp = itemp->nextp()) {
if (AstClockingItem* citemp = VN_CAST(itemp, ClockingItem)) { if (const AstClockingItem* citemp = VN_CAST(itemp, ClockingItem)) {
if (AstVar* const varp if (AstVar* const varp
= citemp->varp() ? citemp->varp() : VN_AS(citemp->user1p(), Var)) { = citemp->varp() ? citemp->varp() : VN_AS(citemp->user1p(), Var)) {
AstModportVarRef* const modVarp = new AstModportVarRef{ AstModportVarRef* const modVarp = new AstModportVarRef{

View File

@ -348,7 +348,7 @@ const char* AstExecGraph::broken() const {
BROKEN_RTN(!m_depGraphp); BROKEN_RTN(!m_depGraphp);
for (const V3GraphVertex& vtx : m_depGraphp->vertices()) { for (const V3GraphVertex& vtx : m_depGraphp->vertices()) {
const ExecMTask* const mtaskp = vtx.as<ExecMTask>(); const ExecMTask* const mtaskp = vtx.as<ExecMTask>();
AstCFunc* const funcp = mtaskp->funcp(); const AstCFunc* const funcp = mtaskp->funcp();
BROKEN_RTN(!funcp || !funcp->brokeExists()); BROKEN_RTN(!funcp || !funcp->brokeExists());
} }
return nullptr; return nullptr;

View File

@ -466,7 +466,7 @@ public:
IgnIndices data; IgnIndices data;
std::vector<std::pair<int, int>> points std::vector<std::pair<int, int>> points
= {{10, 10}, {20, 20}, {40, 40}, {10, 30}, {20, 40}}; = {{10, 10}, {20, 20}, {40, 40}, {10, 30}, {20, 40}};
for (auto& it : points) { for (const auto& it : points) {
controlIgnLines.emplace_back( controlIgnLines.emplace_back(
V3ControlIgnoresLine{V3ErrorCode::I_LINT, it.first, it.second, true}); V3ControlIgnoresLine{V3ErrorCode::I_LINT, it.first, it.second, true});
data.emplace_back(static_cast<uint32_t>(controlIgnLines.size() - 1)); data.emplace_back(static_cast<uint32_t>(controlIgnLines.size() - 1));
@ -514,7 +514,7 @@ public:
UASSERT_SELFTEST(int, nextChange, std::numeric_limits<int>::max()); UASSERT_SELFTEST(int, nextChange, std::numeric_limits<int>::max());
// //
points = {{0, 0}}; points = {{0, 0}};
for (auto& it : points) { for (const auto& it : points) {
controlIgnLines.emplace_back( controlIgnLines.emplace_back(
V3ControlIgnoresLine{V3ErrorCode::I_LINT, it.first, it.second, true}); V3ControlIgnoresLine{V3ErrorCode::I_LINT, it.first, it.second, true});
data.emplace_back(static_cast<uint32_t>(controlIgnLines.size() - 1)); data.emplace_back(static_cast<uint32_t>(controlIgnLines.size() - 1));

View File

@ -178,7 +178,7 @@ void V3DfgPasses::binToOneHot(DfgGraph& dfg, V3DfgBinToOneHotContext& ctx) {
if (selp->width() != 1) continue; if (selp->width() != 1) continue;
DfgShiftL* const shiftLp = selp->fromp()->cast<DfgShiftL>(); DfgShiftL* const shiftLp = selp->fromp()->cast<DfgShiftL>();
if (!shiftLp) continue; if (!shiftLp) continue;
DfgConst* const constp = shiftLp->lhsp()->cast<DfgConst>(); const DfgConst* const constp = shiftLp->lhsp()->cast<DfgConst>();
if (!constp || !useOk(selp, false)) continue; if (!constp || !useOk(selp, false)) continue;
if (!constp->hasValue(1)) continue; if (!constp->hasValue(1)) continue;
srcp = shiftLp->rhsp(); srcp = shiftLp->rhsp();

View File

@ -244,7 +244,7 @@ private:
<< ELEMENTS_MAX << " elements"); << ELEMENTS_MAX << " elements");
} }
bool complexElem = true; bool complexElem = true;
if (AstBasicDType* const basicp = VN_CAST(dtp, BasicDType)) { if (const AstBasicDType* const basicp = VN_CAST(dtp, BasicDType)) {
complexElem = basicp->isOpaque(); complexElem = basicp->isOpaque();
} }
if (complexElem) { if (complexElem) {

View File

@ -112,7 +112,7 @@ class InlineCFuncsVisitor final : public VNVisitor {
} }
// Check if a function is eligible for inlining into caller // Check if a function is eligible for inlining into caller
bool isInlineable(AstCFunc* callerp, AstCFunc* cfuncp) { bool isInlineable(const AstCFunc* callerp, AstCFunc* cfuncp) {
// Must be in the same scope (same class) to access the same members // Must be in the same scope (same class) to access the same members
if (callerp->scopep() != cfuncp->scopep()) return false; if (callerp->scopep() != cfuncp->scopep()) return false;
@ -246,7 +246,7 @@ class InlineCFuncsVisitor final : public VNVisitor {
public: public:
// CONSTRUCTORS // CONSTRUCTORS
explicit InlineCFuncsVisitor(AstNetlist* nodep) explicit InlineCFuncsVisitor(const AstNetlist* nodep)
: m_threshold1{v3Global.opt.inlineCFuncs()} : m_threshold1{v3Global.opt.inlineCFuncs()}
, m_threshold2{v3Global.opt.inlineCFuncsProduct()} { , m_threshold2{v3Global.opt.inlineCFuncsProduct()} {
// Don't inline when profiling or tracing // Don't inline when profiling or tracing

View File

@ -59,7 +59,7 @@ class LibMapVisitor final : public VNVisitor {
public: public:
// CONSTRUCTORS // CONSTRUCTORS
LibMapVisitor(AstNetlist* nodep) { iterate(nodep); } explicit LibMapVisitor(AstNetlist* nodep) { iterate(nodep); }
}; };
//###################################################################### //######################################################################

View File

@ -416,24 +416,24 @@ class LinkCellsVisitor final : public VNVisitor {
m_graph.rank(); m_graph.rank();
for (V3GraphVertex& vtx : m_graph.vertices()) { for (V3GraphVertex& vtx : m_graph.vertices()) {
if (const LinkCellsVertex* const vvertexp = vtx.cast<LinkCellsVertex>()) { if (const LinkCellsVertex* const vvertexp = vtx.cast<LinkCellsVertex>()) {
AstNodeModule* const modp = vvertexp->modp(); AstNodeModule* const vmodp = vvertexp->modp();
modp->level(vvertexp->rank()); vmodp->level(vvertexp->rank());
} }
} }
m_graph.rankMin(); m_graph.rankMin();
for (V3GraphVertex& vtx : m_graph.vertices()) { for (V3GraphVertex& vtx : m_graph.vertices()) {
if (const LinkCellsVertex* const vvertexp = vtx.cast<LinkCellsVertex>()) { if (const LinkCellsVertex* const vvertexp = vtx.cast<LinkCellsVertex>()) {
// +1 so we leave level 1 for the new wrapper we'll make in a moment // +1 so we leave level 1 for the new wrapper we'll make in a moment
AstNodeModule* const modp = vvertexp->modp(); AstNodeModule* const vmodp = vvertexp->modp();
modp->depth(vvertexp->rank() + 1); vmodp->depth(vvertexp->rank() + 1);
} }
} }
if (v3Global.opt.topModule() != "" && !m_topVertexp) { if (v3Global.opt.topModule() != "" && !m_topVertexp) {
VSpellCheck spell; VSpellCheck spell;
for (V3GraphVertex& vtx : m_graph.vertices()) { for (V3GraphVertex& vtx : m_graph.vertices()) {
if (const LinkCellsVertex* const vvertexp = vtx.cast<LinkCellsVertex>()) { if (const LinkCellsVertex* const vvertexp = vtx.cast<LinkCellsVertex>()) {
AstNodeModule* const modp = vvertexp->modp(); AstNodeModule* const vmodp = vvertexp->modp();
if (VN_IS(modp, Module)) spell.pushCandidate(modp->prettyName()); if (VN_IS(vmodp, Module)) spell.pushCandidate(vmodp->prettyName());
} }
} }
const string suggest const string suggest

View File

@ -758,9 +758,9 @@ public:
if ((cellp && cellp->modp()->origName() == ident) if ((cellp && cellp->modp()->origName() == ident)
|| (inlinep && inlinep->origModName() == ident)) { || (inlinep && inlinep->origModName() == ident)) {
break; break;
} else if (VSymEnt* const findSymp } else if (VSymEnt* const findSym2p
= findWithAltFallback(lookupSymp, ident, altIdent)) { = findWithAltFallback(lookupSymp, ident, altIdent)) {
lookupSymp = findSymp; lookupSymp = findSym2p;
if (crossedCell && VN_IS(lookupSymp->nodep(), Var)) { if (crossedCell && VN_IS(lookupSymp->nodep(), Var)) {
UINFO(9, " Not found but matches var name in parent " UINFO(9, " Not found but matches var name in parent "
<< lookupSymp); << lookupSymp);

View File

@ -47,9 +47,9 @@ bool V3LinkDotIfaceCapture::finalizeCapturedEntry(CapturedMap::iterator it, cons
string V3LinkDotIfaceCapture::extractIfacePortName(const string& dotText) { string V3LinkDotIfaceCapture::extractIfacePortName(const string& dotText) {
string name = dotText; string name = dotText;
const size_t dotPos = name.find('.'); const size_t dotPos = name.find('.');
if (dotPos != string::npos) name = name.substr(0, dotPos); if (dotPos != string::npos) name.resize(dotPos);
const size_t braPos = name.find("__BRA__"); const size_t braPos = name.find("__BRA__");
if (braPos != string::npos) name = name.substr(0, braPos); if (braPos != string::npos) name.resize(braPos);
return name; return name;
} }
@ -203,7 +203,7 @@ void V3LinkDotIfaceCapture::captureTypedefContext(
AstVar* ifacePortVarp = nullptr; AstVar* ifacePortVarp = nullptr;
if (!dotText.empty() && curSymp) { if (!dotText.empty() && curSymp) {
const std::string portName = extractIfacePortName(dotText); const std::string portName = extractIfacePortName(dotText);
if (VSymEnt* const portSymp = curSymp->findIdFallback(portName)) { if (const VSymEnt* const portSymp = curSymp->findIdFallback(portName)) {
ifacePortVarp = VN_CAST(portSymp->nodep(), Var); ifacePortVarp = VN_CAST(portSymp->nodep(), Var);
UINFO(9, indentFn() << "iface capture found port var '" << portName << "' -> " UINFO(9, indentFn() << "iface capture found port var '" << portName << "' -> "
<< ifacePortVarp); << ifacePortVarp);

View File

@ -91,7 +91,7 @@ class RandSequenceVisitor final : public VNVisitor {
void findLocalizes(AstRandSequence* nodep) { void findLocalizes(AstRandSequence* nodep) {
std::set<AstVar*> localVars; std::set<AstVar*> localVars;
nodep->foreach([&](AstNode* const nodep) { nodep->foreach([&](AstNode* const nodep) {
if (AstVarRef* const anodep = VN_CAST(nodep, VarRef)) { if (const AstVarRef* const anodep = VN_CAST(nodep, VarRef)) {
m_localizes.emplace(anodep->varp()); m_localizes.emplace(anodep->varp());
} else if (AstVar* const anodep = VN_CAST(nodep, Var)) { } else if (AstVar* const anodep = VN_CAST(nodep, Var)) {
localVars.emplace(anodep); localVars.emplace(anodep);
@ -116,7 +116,7 @@ class RandSequenceVisitor final : public VNVisitor {
new AstConst{fl, AstConst::BitFalse{}}}); new AstConst{fl, AstConst::BitFalse{}}});
// Also add arguments as next's // Also add arguments as next's
for (auto& itr : m_localizeNames) { for (const auto& itr : m_localizeNames) {
const AstVar* const lvarp = itr.second; const AstVar* const lvarp = itr.second;
AstVar* const iovarp AstVar* const iovarp
= new AstVar{fl, VVarType::PORT, "__Vrsarg_" + lvarp->name(), lvarp}; = new AstVar{fl, VVarType::PORT, "__Vrsarg_" + lvarp->name(), lvarp};
@ -154,7 +154,7 @@ class RandSequenceVisitor final : public VNVisitor {
FileLine* const fl = nodep->fileline(); FileLine* const fl = nodep->fileline();
AstArg* const argsp AstArg* const argsp
= new AstArg{fl, breakVarp->name(), new AstVarRef{fl, breakVarp, VAccess::WRITE}}; = new AstArg{fl, breakVarp->name(), new AstVarRef{fl, breakVarp, VAccess::WRITE}};
for (auto& itr : m_localizeNames) { for (const auto& itr : m_localizeNames) {
const AstVar* const lvarp = itr.second; const AstVar* const lvarp = itr.second;
AstVar* const iovarp = m_localizeRemaps[lvarp]; AstVar* const iovarp = m_localizeRemaps[lvarp];
UASSERT_OBJ(iovarp, nodep, "No new port variable for local variable" << lvarp); UASSERT_OBJ(iovarp, nodep, "No new port variable for local variable" << lvarp);
@ -188,7 +188,7 @@ class RandSequenceVisitor final : public VNVisitor {
for (AstRSProdItem* proditemp = VN_AS(prodlistp->prodsp(), RSProdItem); proditemp; for (AstRSProdItem* proditemp = VN_AS(prodlistp->prodsp(), RSProdItem); proditemp;
proditemp = VN_AS(proditemp->nextp(), RSProdItem)) { proditemp = VN_AS(proditemp->nextp(), RSProdItem)) {
lists.push_back(proditemp); lists.push_back(proditemp);
AstRSProd* const subProdp = proditemp->prodp(); const AstRSProd* const subProdp = proditemp->prodp();
if (!subProdp) continue; if (!subProdp) continue;
if (!subProdp->rulesp()) continue; if (!subProdp->rulesp()) continue;
if (!subProdp->rulesp()->prodlistsp()) continue; if (!subProdp->rulesp()->prodlistsp()) continue;
@ -202,7 +202,8 @@ class RandSequenceVisitor final : public VNVisitor {
UINFO(9, "RandJoin productions called:"); UINFO(9, "RandJoin productions called:");
for (AstRSProdItem* proditemp : lists) { for (AstRSProdItem* proditemp : lists) {
UINFO(9, " list " << proditemp); UINFO(9, " list " << proditemp);
for (AstNodeStmt* prodp : listStmts[proditemp]) UINFO(9, " calls " << prodp); for (const AstNodeStmt* prodip : listStmts[proditemp])
UINFO(9, " calls " << prodip);
} }
// Need to clone all nodes used // Need to clone all nodes used
@ -353,12 +354,12 @@ class RandSequenceVisitor final : public VNVisitor {
// "case 2 / * N(a) * /: {statement}; break;" // "case 2 / * N(a) * /: {statement}; break;"
// "case 1 / * N(a) - 1 * /: {statement}; break;" // "case 1 / * N(a) - 1 * /: {statement}; break;"
uint32_t j = static_cast<uint32_t>(listStmts[proditemp].size()); uint32_t j = static_cast<uint32_t>(listStmts[proditemp].size());
for (AstNodeStmt* prodp : listStmts[proditemp]) { for (AstNodeStmt* iprodp : listStmts[proditemp]) {
jIfp->addThensp(new AstIf{ jIfp->addThensp(new AstIf{
fl, fl,
new AstEq{fl, new AstConst{fl, AstConst::WidthedValue{}, 32, j}, new AstEq{fl, new AstConst{fl, AstConst::WidthedValue{}, 32, j},
new AstVarRef{fl, nleftVarps[i], VAccess::READ}}, new AstVarRef{fl, nleftVarps[i], VAccess::READ}},
prodp->cloneTree(false)}); iprodp->cloneTree(false)});
--j; --j;
} }
@ -431,7 +432,7 @@ class RandSequenceVisitor final : public VNVisitor {
UINFOTREE(9, nodep, "RS Tree pre-it", "-"); UINFOTREE(9, nodep, "RS Tree pre-it", "-");
std::unordered_set<AstRSProd*> prodHasRandJoin; std::unordered_set<AstRSProd*> prodHasRandJoin;
for (AstRSProd* prodp = nodep->prodsp(); prodp; prodp = VN_AS(prodp->nextp(), RSProd)) { for (AstRSProd* prodp = nodep->prodsp(); prodp; prodp = VN_AS(prodp->nextp(), RSProd)) {
prodp->foreach([&](AstRSProdList* const prodlistp) { prodp->foreach([&](const AstRSProdList* const prodlistp) {
if (prodlistp->randJoin()) prodHasRandJoin.emplace(prodp); if (prodlistp->randJoin()) prodHasRandJoin.emplace(prodp);
}); });
} }
@ -501,7 +502,7 @@ class RandSequenceVisitor final : public VNVisitor {
iterateAndNextNull(itemsp); iterateAndNextNull(itemsp);
} else if (!nodep->rulesp()->nextp()) { // Single rule/list, can just do it } else if (!nodep->rulesp()->nextp()) { // Single rule/list, can just do it
// RSPROD(RSRULE(weight, stmt)) -> IF(weight != 0, stmt) // RSPROD(RSRULE(weight, stmt)) -> IF(weight != 0, stmt)
AstRSRule* const rulep = nodep->rulesp(); const AstRSRule* const rulep = nodep->rulesp();
AstNode* itemsp = nullptr; AstNode* itemsp = nullptr;
if (rulep->weightStmtsp()) itemsp = rulep->weightStmtsp()->unlinkFrBackWithNext(); if (rulep->weightStmtsp()) itemsp = rulep->weightStmtsp()->unlinkFrBackWithNext();
if (rulep->prodlistsp()) if (rulep->prodlistsp())

View File

@ -148,7 +148,6 @@ class RandomizeMarkVisitor final : public VNVisitor {
bool m_inStdWith = false; // True when inside a 'with {}' clause bool m_inStdWith = false; // True when inside a 'with {}' clause
std::set<AstNodeVarRef*> m_staticRefs; // References to static variables under `with` clauses std::set<AstNodeVarRef*> m_staticRefs; // References to static variables under `with` clauses
AstWith* m_withp = nullptr; // Current 'with' constraint node AstWith* m_withp = nullptr; // Current 'with' constraint node
std::unordered_set<const AstVar*> m_processedVars; // Track by variable instance, not class
// METHODS // METHODS
// Mark all rand variables in IS_RANDOMIZED_GLOBAL classes as globalConstrained // Mark all rand variables in IS_RANDOMIZED_GLOBAL classes as globalConstrained

View File

@ -372,6 +372,7 @@ struct TaskDpiUtils final {
: dtypep->width() <= 16 ? 'S' : dtypep->width() <= 16 ? 'S'
: *dtypep->charIQWN(); : *dtypep->charIQWN();
const std::string& size = std::to_string(dtypep->width()); const std::string& size = std::to_string(dtypep->width());
// cppcheck-suppress strPlusChar
return {"VL_SET_"s + sizeChar + "_" + vecType + "(" + size + ", ", true}; return {"VL_SET_"s + sizeChar + "_" + vecType + "(" + size + ", ", true};
} }
}; };

View File

@ -65,7 +65,7 @@ private:
void visit(AstNodeFTaskRef* nodep) override { void visit(AstNodeFTaskRef* nodep) override {
// Record the call edge if resolved // Record the call edge if resolved
if (m_curTaskp) { if (m_curTaskp) {
if (AstNodeFTask* const calleep = nodep->taskp()) { if (const AstNodeFTask* const calleep = nodep->taskp()) {
UINFO(9, "undriven capture call edge " << CaptureUtil::taskNameQ( UINFO(9, "undriven capture call edge " << CaptureUtil::taskNameQ(
m_curTaskp) << " -> " << CaptureUtil::taskNameQ(calleep)); m_curTaskp) << " -> " << CaptureUtil::taskNameQ(calleep));
m_cap.noteCallEdge(m_curTaskp, calleep); m_cap.noteCallEdge(m_curTaskp, calleep);

View File

@ -136,6 +136,7 @@ const VBasicDTypeKwd LOGIC_IMPLICIT = VBasicDTypeKwd::LOGIC_IMPLICIT;
#define DEL(...) \ #define DEL(...) \
{ \ { \
/* cppcheck-suppress constVariable */ \
AstNode* const nodeps[] = {__VA_ARGS__}; \ AstNode* const nodeps[] = {__VA_ARGS__}; \
for (AstNode* const nodep : nodeps) \ for (AstNode* const nodep : nodeps) \
if (nodep) nodep->deleteTree(); \ if (nodep) nodep->deleteTree(); \