Apply 'make format'

This commit is contained in:
github action 2023-05-06 02:37:42 +00:00
parent 64ab537b68
commit 8a3cb8daa8
2 changed files with 7 additions and 14 deletions

View File

@ -240,10 +240,8 @@ private:
if (nodep->isGParam() && m_modp) m_modp->hasGParam(true); if (nodep->isGParam() && m_modp) m_modp->hasGParam(true);
if (nodep->isParam() && !nodep->valuep() if (nodep->isParam() && !nodep->valuep()
&& nodep->fileline()->language() < V3LangCode::L1800_2009) { && nodep->fileline()->language() < V3LangCode::L1800_2009) {
nodep->v3warn( nodep->v3warn(NEWERSTD,
NEWERSTD, "Parameter requires default value, or use IEEE 1800-2009 or later.");
"Parameter requires default value, or use IEEE 1800-2009 or later."
);
} }
if (VN_IS(nodep->subDTypep(), ParseTypeDType)) { if (VN_IS(nodep->subDTypep(), ParseTypeDType)) {
// It's a parameter type. Use a different node type for this. // It's a parameter type. Use a different node type for this.
@ -333,12 +331,8 @@ private:
} }
} }
void visit(AstConst* nodep) override { void visit(AstConst* nodep) override {
if (nodep->num().autoExtend() if (nodep->num().autoExtend() && nodep->fileline()->language() < V3LangCode::L1800_2005) {
&& nodep->fileline()->language() < V3LangCode::L1800_2005) { nodep->v3warn(NEWERSTD, "Unbased unsized literals require IEEE 1800-2005 or later.");
nodep->v3warn(
NEWERSTD,
"Unbased unsized literals require IEEE 1800-2005 or later."
);
} }
} }

View File

@ -85,10 +85,9 @@ AstArg* V3ParseGrammar::argWrapList(AstNodeExpr* nodep) {
} }
AstNode* V3ParseGrammar::createSupplyExpr(FileLine* fileline, const string& name, int value) { AstNode* V3ParseGrammar::createSupplyExpr(FileLine* fileline, const string& name, int value) {
AstAssignW* assignp AstAssignW* assignp = new AstAssignW{fileline, new AstVarRef{fileline, name, VAccess::WRITE},
= new AstAssignW{fileline, new AstVarRef{fileline, name, VAccess::WRITE}, value ? new AstConst{fileline, AstConst::All1{}}
value ? new AstConst{fileline, AstConst::All1{}} : new AstConst{fileline, AstConst::All0{}}};
: new AstConst{fileline, AstConst::All0{}} };
AstStrengthSpec* strengthSpecp AstStrengthSpec* strengthSpecp
= new AstStrengthSpec{fileline, VStrength::SUPPLY, VStrength::SUPPLY}; = new AstStrengthSpec{fileline, VStrength::SUPPLY, VStrength::SUPPLY};
assignp->strengthSpecp(strengthSpecp); assignp->strengthSpecp(strengthSpecp);