Remove ; from end of some function definitions. No functional change

This commit is contained in:
Wilson Snyder 2009-07-22 14:38:20 -04:00
parent 15b3c9797b
commit c44febe85e
16 changed files with 98 additions and 95 deletions

View File

@ -41,10 +41,10 @@ public:
// enum en {...}; // enum en {...};
// const char* ascii() const {...}; // const char* ascii() const {...};
enum en m_e; enum en m_e;
inline AstType () {}; inline AstType () {}
inline AstType (en _e) : m_e(_e) {}; inline AstType (en _e) : m_e(_e) {}
explicit inline AstType (int _e) : m_e(static_cast<en>(_e)) {}; explicit inline AstType (int _e) : m_e(static_cast<en>(_e)) {}
operator en () const { return m_e; }; operator en () const { return m_e; }
}; };
inline bool operator== (AstType lhs, AstType rhs) { return (lhs.m_e == rhs.m_e); } inline bool operator== (AstType lhs, AstType rhs) { return (lhs.m_e == rhs.m_e); }
inline bool operator== (AstType lhs, AstType::en rhs) { return (lhs.m_e == rhs); } inline bool operator== (AstType lhs, AstType::en rhs) { return (lhs.m_e == rhs); }
@ -64,10 +64,10 @@ public:
PUBLIC_TASK PUBLIC_TASK
}; };
enum en m_e; enum en m_e;
inline AstPragmaType () {}; inline AstPragmaType () {}
inline AstPragmaType (en _e) : m_e(_e) {}; inline AstPragmaType (en _e) : m_e(_e) {}
explicit inline AstPragmaType (int _e) : m_e(static_cast<en>(_e)) {}; explicit inline AstPragmaType (int _e) : m_e(static_cast<en>(_e)) {}
operator en () const { return m_e; }; operator en () const { return m_e; }
}; };
inline bool operator== (AstPragmaType lhs, AstPragmaType rhs) { return (lhs.m_e == rhs.m_e); } inline bool operator== (AstPragmaType lhs, AstPragmaType rhs) { return (lhs.m_e == rhs.m_e); }
inline bool operator== (AstPragmaType lhs, AstPragmaType::en rhs) { return (lhs.m_e == rhs); } inline bool operator== (AstPragmaType lhs, AstPragmaType::en rhs) { return (lhs.m_e == rhs); }
@ -87,10 +87,10 @@ public:
TRACE_CHANGE_SUB TRACE_CHANGE_SUB
}; };
enum en m_e; enum en m_e;
inline AstCFuncType () {}; inline AstCFuncType () {}
inline AstCFuncType (en _e) : m_e(_e) {}; inline AstCFuncType (en _e) : m_e(_e) {}
explicit inline AstCFuncType (int _e) : m_e(static_cast<en>(_e)) {}; explicit inline AstCFuncType (int _e) : m_e(static_cast<en>(_e)) {}
operator en () const { return m_e; }; operator en () const { return m_e; }
// METHODS // METHODS
bool isTrace() const { return (m_e==TRACE_INIT || m_e==TRACE_INIT_SUB bool isTrace() const { return (m_e==TRACE_INIT || m_e==TRACE_INIT_SUB
|| m_e==TRACE_FULL || m_e==TRACE_FULL_SUB || m_e==TRACE_FULL || m_e==TRACE_FULL_SUB
@ -155,10 +155,10 @@ public:
}; };
return names[m_e]; return names[m_e];
}; };
inline AstEdgeType () {}; inline AstEdgeType () {}
inline AstEdgeType (en _e) : m_e(_e) {}; inline AstEdgeType (en _e) : m_e(_e) {}
explicit inline AstEdgeType (int _e) : m_e(static_cast<en>(_e)) {}; explicit inline AstEdgeType (int _e) : m_e(static_cast<en>(_e)) {}
operator en () const { return m_e; }; operator en () const { return m_e; }
}; };
inline bool operator== (AstEdgeType lhs, AstEdgeType rhs) { return (lhs.m_e == rhs.m_e); } inline bool operator== (AstEdgeType lhs, AstEdgeType rhs) { return (lhs.m_e == rhs.m_e); }
inline bool operator== (AstEdgeType lhs, AstEdgeType::en rhs) { return (lhs.m_e == rhs); } inline bool operator== (AstEdgeType lhs, AstEdgeType::en rhs) { return (lhs.m_e == rhs); }
@ -188,10 +188,10 @@ public:
}; };
return names[m_e]; return names[m_e];
}; };
inline AstAttrType () {}; inline AstAttrType () {}
inline AstAttrType (en _e) : m_e(_e) {}; inline AstAttrType (en _e) : m_e(_e) {}
explicit inline AstAttrType (int _e) : m_e(static_cast<en>(_e)) {}; explicit inline AstAttrType (int _e) : m_e(static_cast<en>(_e)) {}
operator en () const { return m_e; }; operator en () const { return m_e; }
}; };
inline bool operator== (AstAttrType lhs, AstAttrType rhs) { return (lhs.m_e == rhs.m_e); } inline bool operator== (AstAttrType lhs, AstAttrType rhs) { return (lhs.m_e == rhs.m_e); }
inline bool operator== (AstAttrType lhs, AstAttrType::en rhs) { return (lhs.m_e == rhs); } inline bool operator== (AstAttrType lhs, AstAttrType::en rhs) { return (lhs.m_e == rhs); }
@ -223,17 +223,17 @@ public:
XTEMP XTEMP
}; };
enum en m_e; enum en m_e;
inline AstVarType () {}; inline AstVarType () {}
inline AstVarType (en _e) : m_e(_e) {}; inline AstVarType (en _e) : m_e(_e) {}
explicit inline AstVarType (int _e) : m_e(static_cast<en>(_e)) {}; explicit inline AstVarType (int _e) : m_e(static_cast<en>(_e)) {}
operator en () const { return m_e; }; operator en () const { return m_e; }
const char* ascii() const { const char* ascii() const {
static const char* names[] = { static const char* names[] = {
"?","GPARAM","LPARAM","GENVAR", "?","GPARAM","LPARAM","GENVAR",
"INTEGER","INPUT","OUTPUT","INOUT", "INTEGER","INPUT","OUTPUT","INOUT",
"SUPPLY0","SUPPLY1","WIRE","IMPLICIT","REG","TRIWIRE","PORT", "SUPPLY0","SUPPLY1","WIRE","IMPLICIT","REG","TRIWIRE","PORT",
"BLOCKTEMP","MODULETEMP","STMTTEMP","XTEMP"}; "BLOCKTEMP","MODULETEMP","STMTTEMP","XTEMP"};
return names[m_e];}; return names[m_e]; }
}; };
inline bool operator== (AstVarType lhs, AstVarType rhs) { return (lhs.m_e == rhs.m_e); } inline bool operator== (AstVarType lhs, AstVarType rhs) { return (lhs.m_e == rhs.m_e); }
inline bool operator== (AstVarType lhs, AstVarType::en rhs) { return (lhs.m_e == rhs); } inline bool operator== (AstVarType lhs, AstVarType::en rhs) { return (lhs.m_e == rhs); }
@ -252,10 +252,10 @@ public:
}; };
enum en m_e; enum en m_e;
// CONSTRUCTOR - note defaults to *UNKNOWN* // CONSTRUCTOR - note defaults to *UNKNOWN*
inline AstBranchPred () : m_e(UNKNOWN) {}; inline AstBranchPred () : m_e(UNKNOWN) {}
inline AstBranchPred (en _e) : m_e(_e) {}; inline AstBranchPred (en _e) : m_e(_e) {}
explicit inline AstBranchPred (int _e) : m_e(static_cast<en>(_e)) {}; explicit inline AstBranchPred (int _e) : m_e(static_cast<en>(_e)) {}
operator en () const { return m_e; }; operator en () const { return m_e; }
AstBranchPred invert() const { AstBranchPred invert() const {
if (m_e==UNLIKELY) return LIKELY; if (m_e==UNLIKELY) return LIKELY;
else if (m_e==LIKELY) return UNLIKELY; else if (m_e==LIKELY) return UNLIKELY;
@ -264,7 +264,7 @@ public:
const char* ascii() const { const char* ascii() const {
static const char* names[] = { static const char* names[] = {
"","VL_LIKELY","VL_UNLIKELY"}; "","VL_LIKELY","VL_UNLIKELY"};
return names[m_e];}; return names[m_e]; }
}; };
inline bool operator== (AstBranchPred lhs, AstBranchPred rhs) { return (lhs.m_e == rhs.m_e); } inline bool operator== (AstBranchPred lhs, AstBranchPred rhs) { return (lhs.m_e == rhs.m_e); }
inline bool operator== (AstBranchPred lhs, AstBranchPred::en rhs) { return (lhs.m_e == rhs); } inline bool operator== (AstBranchPred lhs, AstBranchPred::en rhs) { return (lhs.m_e == rhs); }
@ -281,10 +281,10 @@ public:
CASEZ CASEZ
}; };
enum en m_e; enum en m_e;
inline AstCaseType () {}; inline AstCaseType () {}
inline AstCaseType (en _e) : m_e(_e) {}; inline AstCaseType (en _e) : m_e(_e) {}
explicit inline AstCaseType (int _e) : m_e(static_cast<en>(_e)) {}; explicit inline AstCaseType (int _e) : m_e(static_cast<en>(_e)) {}
operator en () const { return m_e; }; operator en () const { return m_e; }
}; };
inline bool operator== (AstCaseType lhs, AstCaseType rhs) { return (lhs.m_e == rhs.m_e); } inline bool operator== (AstCaseType lhs, AstCaseType rhs) { return (lhs.m_e == rhs.m_e); }
inline bool operator== (AstCaseType lhs, AstCaseType::en rhs) { return (lhs.m_e == rhs); } inline bool operator== (AstCaseType lhs, AstCaseType::en rhs) { return (lhs.m_e == rhs); }
@ -303,16 +303,16 @@ public:
FATAL FATAL
}; };
enum en m_e; enum en m_e;
inline AstDisplayType () {}; inline AstDisplayType () {}
inline AstDisplayType (en _e) : m_e(_e) {}; inline AstDisplayType (en _e) : m_e(_e) {}
explicit inline AstDisplayType (int _e) : m_e(static_cast<en>(_e)) {}; explicit inline AstDisplayType (int _e) : m_e(static_cast<en>(_e)) {}
operator en () const { return m_e; }; operator en () const { return m_e; }
bool addNewline() const { return m_e!=WRITE; } bool addNewline() const { return m_e!=WRITE; }
bool needScopeTracking() const { return m_e!=DISPLAY && m_e!=WRITE; } bool needScopeTracking() const { return m_e!=DISPLAY && m_e!=WRITE; }
const char* ascii() const { const char* ascii() const {
static const char* names[] = { static const char* names[] = {
"display","write","info","error","warning","fatal"}; "display","write","info","error","warning","fatal"};
return names[m_e];}; return names[m_e]; }
}; };
inline bool operator== (AstDisplayType lhs, AstDisplayType rhs) { return (lhs.m_e == rhs.m_e); } inline bool operator== (AstDisplayType lhs, AstDisplayType rhs) { return (lhs.m_e == rhs.m_e); }
inline bool operator== (AstDisplayType lhs, AstDisplayType::en rhs) { return (lhs.m_e == rhs); } inline bool operator== (AstDisplayType lhs, AstDisplayType::en rhs) { return (lhs.m_e == rhs); }
@ -331,14 +331,14 @@ public:
_ENUM_END _ENUM_END
}; };
enum en m_e; enum en m_e;
inline AstParseRefExp() : m_e(NONE) {}; inline AstParseRefExp() : m_e(NONE) {}
inline AstParseRefExp (en _e) : m_e(_e) {}; inline AstParseRefExp (en _e) : m_e(_e) {}
explicit inline AstParseRefExp (int _e) : m_e(static_cast<en>(_e)) {}; explicit inline AstParseRefExp (int _e) : m_e(static_cast<en>(_e)) {}
operator en () const { return m_e; }; operator en () const { return m_e; }
const char* ascii() const { const char* ascii() const {
static const char* names[] = { static const char* names[] = {
"","VAR_MEM","VAR_ANY","TASK","FUNC"}; "","VAR_MEM","VAR_ANY","TASK","FUNC"};
return names[m_e];}; return names[m_e]; }
}; };
inline bool operator== (AstParseRefExp lhs, AstParseRefExp rhs) { return (lhs.m_e == rhs.m_e); } inline bool operator== (AstParseRefExp lhs, AstParseRefExp rhs) { return (lhs.m_e == rhs.m_e); }
inline bool operator== (AstParseRefExp lhs, AstParseRefExp::en rhs) { return (lhs.m_e == rhs); } inline bool operator== (AstParseRefExp lhs, AstParseRefExp::en rhs) { return (lhs.m_e == rhs); }
@ -520,9 +520,9 @@ public:
uint32_t depth() const { return (m_both >> 24) & 255; } uint32_t depth() const { return (m_both >> 24) & 255; }
uint32_t hshval() const { return m_both & M24; } uint32_t hshval() const { return m_both & M24; }
// OPERATORS // OPERATORS
inline bool operator== (const V3Hash& rh) const { return m_both==rh.m_both; }; inline bool operator== (const V3Hash& rh) const { return m_both==rh.m_both; }
inline bool operator!= (const V3Hash& rh) const { return m_both!=rh.m_both; }; inline bool operator!= (const V3Hash& rh) const { return m_both!=rh.m_both; }
inline bool operator< (const V3Hash& rh) const { return m_both<rh.m_both; }; inline bool operator< (const V3Hash& rh) const { return m_both<rh.m_both; }
// CREATORS // CREATORS
class Illegal {}; // for creator type-overload selection class Illegal {}; // for creator type-overload selection
class FullValue {}; // for creator type-overload selection class FullValue {}; // for creator type-overload selection

View File

@ -935,7 +935,7 @@ struct AstAssign : public AstNodeAssign {
} }
ASTNODE_NODE_FUNCS(Assign, ASSIGN) ASTNODE_NODE_FUNCS(Assign, ASSIGN)
virtual AstNode* cloneType(AstNode* lhsp, AstNode* rhsp) { return new AstAssign(this->fileline(), lhsp, rhsp); } virtual AstNode* cloneType(AstNode* lhsp, AstNode* rhsp) { return new AstAssign(this->fileline(), lhsp, rhsp); }
virtual string verilogKwd() const { return "="; }; virtual string verilogKwd() const { return "="; }
}; };
struct AstAssignAlias : public AstNodeAssign { struct AstAssignAlias : public AstNodeAssign {
@ -954,7 +954,7 @@ struct AstAssignDly : public AstNodeAssign {
ASTNODE_NODE_FUNCS(AssignDly, ASSIGNDLY) ASTNODE_NODE_FUNCS(AssignDly, ASSIGNDLY)
virtual AstNode* cloneType(AstNode* lhsp, AstNode* rhsp) { return new AstAssignDly(this->fileline(), lhsp, rhsp); } virtual AstNode* cloneType(AstNode* lhsp, AstNode* rhsp) { return new AstAssignDly(this->fileline(), lhsp, rhsp); }
virtual bool isGateOptimizable() const { return false; } virtual bool isGateOptimizable() const { return false; }
virtual string verilogKwd() const { return "<="; }; virtual string verilogKwd() const { return "<="; }
}; };
struct AstAssignW : public AstNodeAssign { struct AstAssignW : public AstNodeAssign {
@ -1242,7 +1242,7 @@ struct AstFClose : public AstNodeStmt {
setNOp2p(filep); setNOp2p(filep);
} }
ASTNODE_NODE_FUNCS(FClose, FCLOSE) ASTNODE_NODE_FUNCS(FClose, FCLOSE)
virtual string verilogKwd() const { return "$fclose"; }; virtual string verilogKwd() const { return "$fclose"; }
virtual bool isGateOptimizable() const { return false; } virtual bool isGateOptimizable() const { return false; }
virtual bool isPredictOptimizable() const { return false; } virtual bool isPredictOptimizable() const { return false; }
virtual bool isSplittable() const { return false; } virtual bool isSplittable() const { return false; }
@ -1262,7 +1262,7 @@ struct AstFOpen : public AstNodeStmt {
setOp3p(modep); setOp3p(modep);
} }
ASTNODE_NODE_FUNCS(FOpen, FOPEN) ASTNODE_NODE_FUNCS(FOpen, FOPEN)
virtual string verilogKwd() const { return "$fclose"; }; virtual string verilogKwd() const { return "$fclose"; }
virtual bool isGateOptimizable() const { return false; } virtual bool isGateOptimizable() const { return false; }
virtual bool isPredictOptimizable() const { return false; } virtual bool isPredictOptimizable() const { return false; }
virtual bool isSplittable() const { return false; } virtual bool isSplittable() const { return false; }
@ -1283,7 +1283,7 @@ struct AstFFlush : public AstNodeStmt {
setNOp2p(filep); setNOp2p(filep);
} }
ASTNODE_NODE_FUNCS(FFlush, FFLUSH) ASTNODE_NODE_FUNCS(FFlush, FFLUSH)
virtual string verilogKwd() const { return "$fflush"; }; virtual string verilogKwd() const { return "$fflush"; }
virtual bool isGateOptimizable() const { return false; } virtual bool isGateOptimizable() const { return false; }
virtual bool isPredictOptimizable() const { return false; } virtual bool isPredictOptimizable() const { return false; }
virtual bool isSplittable() const { return false; } virtual bool isSplittable() const { return false; }
@ -1371,7 +1371,7 @@ public:
setOp1p(filenamep); setOp2p(memp); setNOp3p(lsbp); setNOp4p(msbp); setOp1p(filenamep); setOp2p(memp); setNOp3p(lsbp); setNOp4p(msbp);
} }
ASTNODE_NODE_FUNCS(ReadMem, READMEM) ASTNODE_NODE_FUNCS(ReadMem, READMEM)
virtual string verilogKwd() const { return (isHex()?"$readmemh":"$readmemb"); }; virtual string verilogKwd() const { return (isHex()?"$readmemh":"$readmemb"); }
virtual bool isGateOptimizable() const { return false; } virtual bool isGateOptimizable() const { return false; }
virtual bool isPredictOptimizable() const { return false; } virtual bool isPredictOptimizable() const { return false; }
virtual bool isSplittable() const { return false; } virtual bool isSplittable() const { return false; }

View File

@ -43,7 +43,7 @@ public:
V3OutCFile(const string& filename) : V3OutFile(filename) { V3OutCFile(const string& filename) : V3OutFile(filename) {
resetPrivate(); resetPrivate();
} }
virtual ~V3OutCFile() {}; virtual ~V3OutCFile() {}
virtual void putsCellDecl(const string& classname, const string& cellname) { virtual void putsCellDecl(const string& classname, const string& cellname) {
this->printf("%-19s\t%s;\n", this->printf("%-19s\t%s;\n",
(classname + "*").c_str(),cellname.c_str()); (classname + "*").c_str(),cellname.c_str());
@ -66,7 +66,7 @@ public:
class V3OutScFile : public V3OutCFile { class V3OutScFile : public V3OutCFile {
public: public:
V3OutScFile(const string& filename) : V3OutCFile(filename) {} V3OutScFile(const string& filename) : V3OutCFile(filename) {}
virtual ~V3OutScFile() {}; virtual ~V3OutScFile() {}
virtual void putsHeader() { puts("// Verilated -*- SystemC -*-\n"); } virtual void putsHeader() { puts("// Verilated -*- SystemC -*-\n"); }
virtual void putsIntTopInclude() { virtual void putsIntTopInclude() {
puts("#include \"systemc.h\"\n"); puts("#include \"systemc.h\"\n");
@ -77,7 +77,7 @@ public:
class V3OutSpFile : public V3OutCFile { class V3OutSpFile : public V3OutCFile {
public: public:
V3OutSpFile(const string& filename) : V3OutCFile(filename) {} V3OutSpFile(const string& filename) : V3OutCFile(filename) {}
virtual ~V3OutSpFile() {}; virtual ~V3OutSpFile() {}
virtual void putsHeader() { puts("// Verilated -*- SystemC -*-\n"); } virtual void putsHeader() { puts("// Verilated -*- SystemC -*-\n"); }
virtual void putsIntTopInclude() { virtual void putsIntTopInclude() {
puts("#include \"systemperl.h\"\n"); puts("#include \"systemperl.h\"\n");
@ -88,14 +88,14 @@ public:
class V3OutVFile : public V3OutFile { class V3OutVFile : public V3OutFile {
public: public:
V3OutVFile(const string& filename) : V3OutFile(filename) {} V3OutVFile(const string& filename) : V3OutFile(filename) {}
virtual ~V3OutVFile() {}; virtual ~V3OutVFile() {}
virtual void putsHeader() { puts("// Verilated -*- Verilog -*-\n"); } virtual void putsHeader() { puts("// Verilated -*- Verilog -*-\n"); }
}; };
class V3OutMkFile : public V3OutFile { class V3OutMkFile : public V3OutFile {
public: public:
V3OutMkFile(const string& filename) : V3OutFile(filename) {} V3OutMkFile(const string& filename) : V3OutFile(filename) {}
virtual ~V3OutMkFile() {}; virtual ~V3OutMkFile() {}
virtual void putsHeader() { puts("# Verilated -*- Makefile -*-\n"); } virtual void putsHeader() { puts("# Verilated -*- Makefile -*-\n"); }
// No automatic indentation yet. // No automatic indentation yet.
void puts(const char* strg) { putsNoTracking(strg); } void puts(const char* strg) { putsNoTracking(strg); }
@ -110,7 +110,7 @@ public:
// STATE // STATE
V3OutCFile* m_ofp; V3OutCFile* m_ofp;
// METHODS // METHODS
V3OutCFile* ofp() const { return m_ofp; }; V3OutCFile* ofp() const { return m_ofp; }
void puts(const string& str) { ofp()->puts(str); } void puts(const string& str) { ofp()->puts(str); }
void putbs(const string& str) { ofp()->putbs(str); } void putbs(const string& str) { ofp()->putbs(str); }
void putsQuoted(const string& str) { ofp()->putsQuoted(str); } void putsQuoted(const string& str) { ofp()->putsQuoted(str); }

View File

@ -461,7 +461,7 @@ class EmitVFileVisitor : public EmitVBaseVisitor {
// MEMBERS // MEMBERS
V3OutFile* m_ofp; V3OutFile* m_ofp;
// METHODS // METHODS
V3OutFile* ofp() const { return m_ofp; }; V3OutFile* ofp() const { return m_ofp; }
void puts(const string& str) { ofp()->puts(str); } void puts(const string& str) { ofp()->puts(str); }
void putbs(const string& str) { ofp()->putbs(str); } void putbs(const string& str) { ofp()->putbs(str); }
void putsNoTracking(const string& str) { ofp()->putsNoTracking(str); } void putsNoTracking(const string& str) { ofp()->putsNoTracking(str); }

View File

@ -46,7 +46,7 @@ bool V3Error::s_describedWarnings = false;
bool V3Error::s_pretendError[V3ErrorCode::MAX]; bool V3Error::s_pretendError[V3ErrorCode::MAX];
struct v3errorIniter { struct v3errorIniter {
v3errorIniter() { V3Error::init(); }; v3errorIniter() { V3Error::init(); }
}; };
v3errorIniter v3errorInit; v3errorIniter v3errorInit;
@ -358,7 +358,7 @@ void V3Error::v3errorEnd (ostringstream& sstr) {
// If first warning is not the user's fault (internal/unsupported) then give the website // If first warning is not the user's fault (internal/unsupported) then give the website
// Not later warnings, as a internal may be caused by an earlier problem // Not later warnings, as a internal may be caused by an earlier problem
if (s_tellManual == 0) { if (s_tellManual == 0) {
if (s_errorCode==V3ErrorCode::FATALSRC if (s_errorCode.mentionManual()
|| sstr.str().find("Unsupported") != string::npos) { || sstr.str().find("Unsupported") != string::npos) {
s_tellManual = 1; s_tellManual = 1;
} else { } else {

View File

@ -77,11 +77,11 @@ public:
// ***Add new elements below also*** // ***Add new elements below also***
}; };
enum en m_e; enum en m_e;
inline V3ErrorCode () {}; inline V3ErrorCode () {}
inline V3ErrorCode (en _e) : m_e(_e) {}; inline V3ErrorCode (en _e) : m_e(_e) {}
V3ErrorCode (const char* msgp); // Matching code or ERROR V3ErrorCode (const char* msgp); // Matching code or ERROR
explicit inline V3ErrorCode (int _e) : m_e(static_cast<en>(_e)) {}; explicit inline V3ErrorCode (int _e) : m_e(static_cast<en>(_e)) {}
operator en () const { return m_e; }; operator en () const { return m_e; }
const char* ascii() const { const char* ascii() const {
const char* names[] = { const char* names[] = {
// Leading spaces indicate it can't be disabled. // Leading spaces indicate it can't be disabled.
@ -101,14 +101,17 @@ public:
" MAX" " MAX"
}; };
return names[m_e]; return names[m_e];
}; }
// Warnings that default to off // Warnings that default to off
bool defaultsOff() const { return ( m_e==IMPERFECTSCH );}; bool defaultsOff() const { return ( m_e==IMPERFECTSCH ); }
// Warnings that warn about nasty side effects // Warnings that warn about nasty side effects
bool dangerous() const { return ( m_e==COMBDLY );}; bool dangerous() const { return ( m_e==COMBDLY ); }
// Warnings we'll present to the user as errors // Warnings we'll present to the user as errors
// Later -Werror- options may make more of these. // Later -Werror- options may make more of these.
bool pretendError() const { return ( m_e==BLKANDNBLK || m_e==IMPURE); }; bool pretendError() const { return ( m_e==BLKANDNBLK || m_e==IMPURE ); }
// Warnings to mention manual
bool mentionManual() const { return ( m_e==FATALSRC || pretendError() ); }
// Warnings that are lint only // Warnings that are lint only
bool lintError() const { return ( m_e==CASEINCOMPLETE || m_e==CASEOVERLAP bool lintError() const { return ( m_e==CASEINCOMPLETE || m_e==CASEOVERLAP
|| m_e==CASEWITHX || m_e==CASEX || m_e==CASEWITHX || m_e==CASEX
@ -116,7 +119,7 @@ public:
|| m_e==IMPLICIT || m_e==IMPLICIT
|| m_e==UNDRIVEN || m_e==UNSIGNED || m_e==UNDRIVEN || m_e==UNSIGNED
|| m_e==UNUSED || m_e==VARHIDDEN || m_e==UNUSED || m_e==VARHIDDEN
|| m_e==WIDTH); }; || m_e==WIDTH); }
}; };
inline bool operator== (V3ErrorCode lhs, V3ErrorCode rhs) { return (lhs.m_e == rhs.m_e); } inline bool operator== (V3ErrorCode lhs, V3ErrorCode rhs) { return (lhs.m_e == rhs.m_e); }
inline bool operator== (V3ErrorCode lhs, V3ErrorCode::en rhs) { return (lhs.m_e == rhs); } inline bool operator== (V3ErrorCode lhs, V3ErrorCode::en rhs) { return (lhs.m_e == rhs); }

View File

@ -62,7 +62,7 @@ class V3FileDependImp {
} }
} }
} }
bool operator<(const DependFile& rhs) const { return filename()<rhs.filename(); }; bool operator<(const DependFile& rhs) const { return filename()<rhs.filename(); }
}; };
// MEMBERS // MEMBERS

View File

@ -123,7 +123,7 @@ public:
bool exceededWidth() const { return m_column > WIDTH; } bool exceededWidth() const { return m_column > WIDTH; }
bool tokenStart(const char* cp, const char* cmp); bool tokenStart(const char* cp, const char* cmp);
bool tokenEnd(const char* cp); bool tokenEnd(const char* cp);
void indentInc() { m_indentLevel += INDBLK; }; void indentInc() { m_indentLevel += INDBLK; }
void indentDec() { void indentDec() {
m_indentLevel -= INDBLK; m_indentLevel -= INDBLK;
UASSERT(m_indentLevel>=0, ": "<<m_filename<<": Underflow of indentation\n"); UASSERT(m_indentLevel>=0, ": "<<m_filename<<": Underflow of indentation\n");

View File

@ -69,7 +69,7 @@ protected:
}; };
uint32_t m_flags; uint32_t m_flags;
VarFlags(AstNode* nodep) { m_flags = nodep->user2(); } VarFlags(AstNode* nodep) { m_flags = nodep->user2(); }
void setNodeFlags(AstNode* nodep) { nodep->user2(m_flags); }; void setNodeFlags(AstNode* nodep) { nodep->user2(m_flags); }
}; };
}; };

View File

@ -108,7 +108,7 @@ public:
class VerilogString {}; // for creator type-overload selection class VerilogString {}; // for creator type-overload selection
// CONSTRUCTORS // CONSTRUCTORS
V3Number(FileLine* fileline) { init(fileline, 1); } V3Number(FileLine* fileline) { init(fileline, 1); }
V3Number(FileLine* fileline, int width) { init(fileline, width); }; // 0=unsized V3Number(FileLine* fileline, int width) { init(fileline, width); } // 0=unsized
V3Number(FileLine* fileline, int width, uint32_t value) { init(fileline, width); m_value[0]=value; } V3Number(FileLine* fileline, int width, uint32_t value) { init(fileline, width); m_value[0]=value; }
V3Number(FileLine* fileline, const char* source); // Create from a verilog 32'hxxxx number. V3Number(FileLine* fileline, const char* source); // Create from a verilog 32'hxxxx number.
V3Number(VerilogString, FileLine* fileline, const string& vvalue); V3Number(VerilogString, FileLine* fileline, const string& vvalue);

View File

@ -60,11 +60,11 @@ public:
bool legal() const { return m_e != ERROR; } bool legal() const { return m_e != ERROR; }
// //
enum en m_e; enum en m_e;
inline V3LangCode () : m_e(ERROR) {}; inline V3LangCode () : m_e(ERROR) {}
inline V3LangCode (en _e) : m_e(_e) {}; inline V3LangCode (en _e) : m_e(_e) {}
V3LangCode (const char* textp); // Return matching code or ERROR V3LangCode (const char* textp); // Return matching code or ERROR
explicit inline V3LangCode (int _e) : m_e(static_cast<en>(_e)) {}; explicit inline V3LangCode (int _e) : m_e(static_cast<en>(_e)) {}
operator en () const { return m_e; }; operator en () const { return m_e; }
}; };
//###################################################################### //######################################################################

View File

@ -103,12 +103,12 @@ struct OrderVEdgeType {
}; };
return names[m_e]; return names[m_e];
}; }
enum en m_e; enum en m_e;
inline OrderVEdgeType () {}; inline OrderVEdgeType () {}
inline OrderVEdgeType (en _e) : m_e(_e) {}; inline OrderVEdgeType (en _e) : m_e(_e) {}
explicit inline OrderVEdgeType (int _e) : m_e(static_cast<en>(_e)) {}; explicit inline OrderVEdgeType (int _e) : m_e(static_cast<en>(_e)) {}
operator en () const { return m_e; }; operator en () const { return m_e; }
}; };
inline bool operator== (OrderVEdgeType lhs, OrderVEdgeType rhs) { return (lhs.m_e == rhs.m_e); } inline bool operator== (OrderVEdgeType lhs, OrderVEdgeType rhs) { return (lhs.m_e == rhs.m_e); }
inline bool operator== (OrderVEdgeType lhs, OrderVEdgeType::en rhs) { return (lhs.m_e == rhs); } inline bool operator== (OrderVEdgeType lhs, OrderVEdgeType::en rhs) { return (lhs.m_e == rhs); }

View File

@ -83,7 +83,7 @@ protected:
}; };
public: public:
static V3PreProc* createPreProc(FileLine* fileline); static V3PreProc* createPreProc(FileLine* fileline);
virtual ~V3PreProc() {}; virtual ~V3PreProc() {}
}; };
#endif // Guard #endif // Guard

View File

@ -103,7 +103,7 @@ public: // But for internal use only
} }
// Return next token, for bison, since bison isn't class based, use a global THIS // Return next token, for bison, since bison isn't class based, use a global THIS
static int yylex() { return s_readp->yylexThis(); }; static int yylex() { return s_readp->yylexThis(); }
static FileLine* fileline() { return s_readp->m_fileline; } static FileLine* fileline() { return s_readp->m_fileline; }
static AstNetlist* rootp() { return s_readp->m_rootp; } static AstNetlist* rootp() { return s_readp->m_rootp; }
static FileLine* copyOrSameFileLine() { return s_readp->fileline()->copyOrSameFileLine(); } static FileLine* copyOrSameFileLine() { return s_readp->fileline()->copyOrSameFileLine(); }

View File

@ -34,19 +34,19 @@ class V3Double0 {
double m_d; ///< Count of occurrences/ value double m_d; ///< Count of occurrences/ value
public: public:
// METHODS // METHODS
V3Double0() : m_d(0) {}; V3Double0() : m_d(0) {}
~V3Double0() {} ~V3Double0() {}
// Implicit conversion operators: // Implicit conversion operators:
inline V3Double0 (const vluint64_t v) : m_d(v) { }; inline V3Double0 (const vluint64_t v) : m_d(v) { }
inline operator double () const { return m_d; }; inline operator double () const { return m_d; }
// Explicit operators: // Explicit operators:
inline V3Double0& operator++() { ++m_d; return *this; }; // prefix inline V3Double0& operator++() { ++m_d; return *this; } // prefix
inline V3Double0 operator++(int) { V3Double0 old=*this; m_d++; return old; }; // postfix inline V3Double0 operator++(int) { V3Double0 old=*this; m_d++; return old; } // postfix
inline V3Double0& operator= (const double v) { m_d = v; return *this; }; inline V3Double0& operator= (const double v) { m_d = v; return *this; }
inline V3Double0& operator+=(const double v) { m_d += v; return *this; }; inline V3Double0& operator+=(const double v) { m_d += v; return *this; }
inline V3Double0& operator-=(const double v) { m_d -= v; return *this; }; inline V3Double0& operator-=(const double v) { m_d -= v; return *this; }
}; };
//============================================================================ //============================================================================

View File

@ -67,7 +67,7 @@
int m_minWidth; // Minimum width, for (2+2), it's 2 bits, for 32'2+32'2 it's 32 bits int m_minWidth; // Minimum width, for (2+2), it's 2 bits, for 32'2+32'2 it's 32 bits
Stage m_stage; // If true, report errors Stage m_stage; // If true, report errors
public: public:
WidthVP(int width, int minWidth, Stage stage) : m_width(width), m_minWidth(minWidth), m_stage(stage) {}; WidthVP(int width, int minWidth, Stage stage) : m_width(width), m_minWidth(minWidth), m_stage(stage) {}
int width() const { return m_width; } int width() const { return m_width; }
int widthMin() const { return m_minWidth?m_minWidth:m_width; } int widthMin() const { return m_minWidth?m_minWidth:m_width; }
bool prelim() const { return m_stage&1; } bool prelim() const { return m_stage&1; }