Internals: Upgrade to clang-format-18 (#6333)

This commit is contained in:
Wilson Snyder
2025-08-25 20:47:48 -04:00
committed by GitHub
parent 703f0d8c5d
commit ac2859bf24
26 changed files with 108 additions and 112 deletions
+4 -6
View File
@@ -1394,8 +1394,8 @@ void AstNode::dumpTreeFile(const string& filename, bool doDump) {
static void drawChildren(std::ostream& os, const AstNode* thisp, const AstNode* childp,
const std::string& childName) {
if (childp) {
os << "\tn" << cvtToHex(thisp) << " -> n" << cvtToHex(childp) << " ["
<< "label=\"" << childName << "\" color=red];\n";
os << "\tn" << cvtToHex(thisp) << " -> n" << cvtToHex(childp) << " [" << "label=\""
<< childName << "\" color=red];\n";
for (const AstNode* nodep = childp; nodep; nodep = nodep->nextp()) {
nodep->dumpTreeDot(os);
if (nodep->nextp()) {
@@ -1409,8 +1409,7 @@ static void drawChildren(std::ostream& os, const AstNode* thisp, const AstNode*
}
void AstNode::dumpTreeDot(std::ostream& os) const {
os << "\tn" << cvtToHex(this) << "\t["
<< "label=\"" << typeName() << "\\n"
os << "\tn" << cvtToHex(this) << "\t[" << "label=\"" << typeName() << "\\n"
<< name() << "\"];\n";
drawChildren(os, this, m_op1p, "op1");
drawChildren(os, this, m_op2p, "op2");
@@ -1447,8 +1446,7 @@ void AstNode::dumpTreeDotFile(const string& filename, bool doDump) {
const std::unique_ptr<std::ofstream> treedotp{V3File::new_ofstream(filename)};
if (treedotp->fail()) v3fatal("Can't write file: " << filename);
*treedotp << "digraph vTree{\n";
*treedotp << "\tgraph\t[label=\"" << filename + ".dot"
<< "\",\n";
*treedotp << "\tgraph\t[label=\"" << filename + ".dot" << "\",\n";
*treedotp << "\t\t labelloc=t, labeljust=l,\n";
*treedotp << "\t\t //size=\"7.5,10\",\n"
<< "];\n";