Internals: Cleanup empty string constructors for clang-tidy. No functional change.
This commit is contained in:
parent
e8b8b33ff6
commit
442e4f35f0
|
|
@ -1977,8 +1977,8 @@ private:
|
|||
}
|
||||
if (m_doNConst && anyconst) {
|
||||
//UINFO(9," Display in "<<nodep->text()<<endl);
|
||||
string newFormat = "";
|
||||
string fmt = "";
|
||||
string newFormat;
|
||||
string fmt;
|
||||
bool inPct = false;
|
||||
AstNode* argp = nodep->exprsp();
|
||||
string text = nodep->text();
|
||||
|
|
|
|||
|
|
@ -1559,7 +1559,7 @@ void EmitCStmts::displayNode(AstNode* nodep, AstScopeName* scopenamep,
|
|||
// Convert Verilog display to C printf formats
|
||||
// "%0t" becomes "%d"
|
||||
emitDispState.clear();
|
||||
string vfmt = "";
|
||||
string vfmt;
|
||||
string::const_iterator pos = vformat.begin();
|
||||
bool inPct = false;
|
||||
for (; pos != vformat.end(); ++pos) {
|
||||
|
|
@ -2242,7 +2242,7 @@ void EmitCStmts::emitVarSort(const VarSortMap& vmap, VarVec* sortedp) {
|
|||
void EmitCStmts::emitSortedVarList(const VarVec& anons,
|
||||
const VarVec& nonanons,
|
||||
const string& prefixIfImp) {
|
||||
string curVarCmt = "";
|
||||
string curVarCmt;
|
||||
// Output anons
|
||||
{
|
||||
int anonMembers = anons.size();
|
||||
|
|
|
|||
|
|
@ -485,7 +485,7 @@ public:
|
|||
}
|
||||
baddot = ident; // So user can see where they botched it
|
||||
okSymp = lookupSymp;
|
||||
string altIdent = "";
|
||||
string altIdent;
|
||||
if (m_forPrearray) {
|
||||
// GENFOR Begin is foo__BRA__##__KET__ after we've genloop unrolled,
|
||||
// but presently should be just "foo".
|
||||
|
|
|
|||
|
|
@ -256,7 +256,7 @@ private:
|
|||
// Check display arguments, return new format string
|
||||
string newFormat;
|
||||
bool inPct = false;
|
||||
string fmt = "";
|
||||
string fmt;
|
||||
for (string::const_iterator it = format.begin(); it != format.end(); ++it) {
|
||||
char ch = *it;
|
||||
if (!inPct && ch=='%') {
|
||||
|
|
|
|||
|
|
@ -629,7 +629,7 @@ string V3PreProcImp::defineSubst(V3DefineRef* refp) {
|
|||
}
|
||||
}
|
||||
|
||||
string out = "";
|
||||
string out;
|
||||
{ // Parse substitution define using arguments
|
||||
string argName;
|
||||
bool quote = false;
|
||||
|
|
|
|||
|
|
@ -831,7 +831,7 @@ private:
|
|||
if (m_params) {
|
||||
AstNode* nextArgp = nodep->exprsp();
|
||||
|
||||
string result = "";
|
||||
string result;
|
||||
string format = nodep->text();
|
||||
string::const_iterator pos = format.begin();
|
||||
bool inPct = false;
|
||||
|
|
|
|||
|
|
@ -969,7 +969,7 @@ private:
|
|||
else if (ftaskNoInline) prefix = "__VnoInFunc_";
|
||||
// Unless public, v3Descope will not uniquify function names even if duplicate per-scope,
|
||||
// so make it unique now.
|
||||
string suffix = ""; // So, make them unique
|
||||
string suffix; // So, make them unique
|
||||
if (!nodep->taskPublic()) suffix = "_"+m_scopep->nameDotless();
|
||||
AstCFunc* cfuncp = new AstCFunc(nodep->fileline(),
|
||||
prefix + nodep->name() + suffix,
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ private:
|
|||
inline bool drivenFlag(int bit) const { return m_drivenWhole || m_flags[bit*FLAGS_PER_BIT + FLAG_DRIVEN]; }
|
||||
enum BitNamesWhich { BN_UNUSED, BN_UNDRIVEN, BN_BOTH };
|
||||
string bitNames(BitNamesWhich which) {
|
||||
string bits="";
|
||||
string bits;
|
||||
bool prev = false;
|
||||
int msb = 0;
|
||||
// bit==-1 loops below; we do one extra iteration so end with prev=false
|
||||
|
|
|
|||
|
|
@ -238,7 +238,7 @@ void VlcTop::annotateOutputFiles(const string& dirname) {
|
|||
if (first) {
|
||||
first = false;
|
||||
// Multiple columns on same line; print line just once
|
||||
string indent = "";
|
||||
string indent;
|
||||
for (string::const_iterator pos=line.begin(); pos!=line.end() && isspace(*pos); ++pos) {
|
||||
indent += *pos;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3070,7 +3070,7 @@ dpi_import_export<nodep>: // ==IEEE: dpi_import_export
|
|||
;
|
||||
|
||||
dpi_importLabelE<strp>: // IEEE: part of dpi_import_export
|
||||
/* empty */ { static string s = ""; $$ = &s; }
|
||||
/* empty */ { static string s; $$ = &s; }
|
||||
| idAny/*c_identifier*/ '=' { $$ = $1; $<fl>$=$<fl>1; }
|
||||
;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue