Internals: Cleanup temp string inserts for clang-tidy. No functional change.
This commit is contained in:
parent
595419b370
commit
b7e4083e70
|
|
@ -1866,6 +1866,7 @@ void EmitCImp::emitSavableImp(AstNodeModule* modp) {
|
|||
string funcname = de ? "__Vdeserialize" : "__Vserialize";
|
||||
string writeread = de ? "read" : "write";
|
||||
string op = de ? ">>" : "<<";
|
||||
// NOLINTNEXTLINE(performance-inefficient-string-concatenation)
|
||||
puts("void "+modClassName(modp)+"::"+funcname+"("+classname+"& os) {\n");
|
||||
// Place a computed checksum to insure proper structure save/restore formatting
|
||||
// OK if this hash includes some things we won't dump, since just looking for loading the wrong model
|
||||
|
|
|
|||
|
|
@ -526,6 +526,7 @@ void EmitCSyms::emitSymImp() {
|
|||
string classname = de ? "VerilatedDeserialize" : "VerilatedSerialize";
|
||||
string funcname = de ? "__Vdeserialize" : "__Vserialize";
|
||||
string op = de ? ">>" : "<<";
|
||||
// NOLINTNEXTLINE(performance-inefficient-string-concatenation)
|
||||
puts("void "+symClassName()+"::"+funcname+"("+classname+"& os) {\n");
|
||||
puts( "// LOCAL STATE\n");
|
||||
// __Vm_namep presumably already correct
|
||||
|
|
|
|||
|
|
@ -208,6 +208,7 @@ public:
|
|||
for (V3StringSet::const_iterator it = cppFiles.begin(); it != cppFiles.end(); ++it) {
|
||||
string cppfile = *it;
|
||||
string basename = V3Os::filenameNonExt(cppfile);
|
||||
// NOLINTNEXTLINE(performance-inefficient-string-concatenation)
|
||||
of.puts(basename+".o: "+cppfile+"\n");
|
||||
of.puts("\t$(OBJCACHE) $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(OPT_FAST) -c -o $@ $<\n");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
#include "config_build.h"
|
||||
#include "verilatedos.h"
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
|
|
|||
|
|
@ -556,8 +556,8 @@ string V3Number::displayed(FileLine*fl, const string& vformat) const {
|
|||
int intfmtsize = atoi(fmtsize.c_str());
|
||||
bool zeropad = fmtsize.length()>0 && fmtsize[0]=='0';
|
||||
while ((int)(str.length()) < intfmtsize) {
|
||||
if (zeropad) str = "0"+str;
|
||||
else str = " "+str;
|
||||
if (zeropad) str.insert(0, "0");
|
||||
else str.insert(0, " ");
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -818,7 +818,7 @@ int V3PreProcImp::getRawToken() {
|
|||
static string rtncmt; // Keep the c string till next call
|
||||
rtncmt = m_lineCmt;
|
||||
if (m_lineCmtNl) {
|
||||
if (!m_rawAtBol) rtncmt = "\n"+rtncmt;
|
||||
if (!m_rawAtBol) rtncmt.insert(0, "\n");
|
||||
m_lineCmtNl = false;
|
||||
}
|
||||
yyourtext(rtncmt.c_str(), rtncmt.length());
|
||||
|
|
@ -1099,7 +1099,7 @@ int V3PreProcImp::getStateToken() {
|
|||
if (state() == ps_JOIN) { // Handle {left}```FOO(ARG) where `FOO(ARG) might be empty
|
||||
if (m_joinStack.empty()) fatalSrc("`` join stack empty, but in a ``");
|
||||
string lhs = m_joinStack.top(); m_joinStack.pop();
|
||||
out = lhs+out;
|
||||
out.insert(0, lhs);
|
||||
UINFO(5,"``-end-defarg Out:"<<out<<endl);
|
||||
statePop();
|
||||
}
|
||||
|
|
@ -1323,7 +1323,7 @@ int V3PreProcImp::getStateToken() {
|
|||
if (state() == ps_JOIN) { // Handle {left}```FOO where `FOO might be empty
|
||||
if (m_joinStack.empty()) fatalSrc("`` join stack empty, but in a ``");
|
||||
string lhs = m_joinStack.top(); m_joinStack.pop();
|
||||
out = lhs+out;
|
||||
out.insert(0, lhs);
|
||||
UINFO(5,"``-end-defref Out:"<<out<<endl);
|
||||
statePop();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -859,8 +859,9 @@ private:
|
|||
// At runtime we need the svOpenArrayHandle to point to this task & thread's data,
|
||||
// in addition to static info about the variable
|
||||
string name = portp->name()+"__Vopenarray";
|
||||
string varCode = ("VerilatedDpiOpenVar "+name
|
||||
+" (&"+propName+", &"+portp->name()+");\n");
|
||||
string varCode = ("VerilatedDpiOpenVar "
|
||||
// NOLINTNEXTLINE(performance-inefficient-string-concatenation)
|
||||
+name+" (&"+propName+", &"+portp->name()+");\n");
|
||||
cfuncp->addStmtsp(new AstCStmt(portp->fileline(), varCode));
|
||||
args += "&"+name;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue