diff --git a/src/V3ParseGrammar.cpp b/src/V3ParseGrammar.cpp index 4964d8e53..d77351c7a 100644 --- a/src/V3ParseGrammar.cpp +++ b/src/V3ParseGrammar.cpp @@ -240,9 +240,7 @@ AstVar* V3ParseGrammar::createVariable(FileLine* fileline, const string& name, } else { nodep->trace(allTracingOn(nodep->fileline())); } - if (nodep->varType().isVPIAccessible()) { - nodep->addAttrsp(GRAMMARP->cloneScopedSigAttr()); - } + if (nodep->varType().isVPIAccessible()) { nodep->addAttrsp(GRAMMARP->cloneScopedSigAttr()); } // Remember the last variable created, so we can attach attributes to it in later parsing GRAMMARP->m_varAttrp = nodep; diff --git a/src/V3PreProc.cpp b/src/V3PreProc.cpp index 0696efe56..6a45c3e22 100644 --- a/src/V3PreProc.cpp +++ b/src/V3PreProc.cpp @@ -480,7 +480,7 @@ void V3PreProcImp::comment(const string& text) { string arg = cmd.substr(endOfCmd); while (isspace(arg[0])) arg = arg.substr(1); if (arg.size() && baseCmd == "public_flat_rw_on") - baseCmd += "_sns"; // different cmd for applying sensitivity + baseCmd += "_sns"; // different cmd for applying sensitivity if (!printed) insertUnreadback("/*verilator " + baseCmd + "*/ " + arg + " /**/"); } else { if (!printed) insertUnreadback("/*verilator " + cmd + "*/"); diff --git a/src/verilog.y b/src/verilog.y index d8f7cf4d2..d54560c4a 100644 --- a/src/verilog.y +++ b/src/verilog.y @@ -273,8 +273,8 @@ public: } void setScopedSigAttr(AstNode* attrsp) { - if (m_scopedSigAttr) { // clearing set attribute - VL_DO_DANGLING(m_scopedSigAttr->deleteTree(), m_scopedSigAttr); + if (m_scopedSigAttr) { // clearing set attribute + VL_DO_DANGLING(m_scopedSigAttr->deleteTree(), m_scopedSigAttr); } m_scopedSigAttr = attrsp; }