[Gardening] Fix some set but not used variables

This commit is contained in:
Anthony Latsis
2025-01-19 23:11:51 +00:00
parent 71015c674b
commit a84dfc8387
89 changed files with 169 additions and 181 deletions

View File

@@ -79,11 +79,11 @@ bool ASTNode::isImplicit() const {
return D->isImplicit();
if (const auto *P = this->dyn_cast<Pattern*>())
return P->isImplicit();
if (const auto *T = this->dyn_cast<TypeRepr*>())
if (this->is<TypeRepr *>())
return false;
if (const auto *C = this->dyn_cast<StmtConditionElement *>())
if (this->is<StmtConditionElement *>())
return false;
if (const auto *I = this->dyn_cast<CaseLabelItem *>())
if (this->is<CaseLabelItem *>())
return false;
llvm_unreachable("unsupported AST node");
}
@@ -124,9 +124,9 @@ void ASTNode::dump(raw_ostream &OS, unsigned Indent) const {
P->dump(OS, Indent);
else if (auto T = dyn_cast<TypeRepr*>())
T->print(OS);
else if (auto *C = dyn_cast<StmtConditionElement *>())
else if (is<StmtConditionElement *>())
OS.indent(Indent) << "(statement condition)";
else if (auto *I = dyn_cast<CaseLabelItem *>()) {
else if (is<CaseLabelItem *>()) {
OS.indent(Indent) << "(case label item)";
} else
llvm_unreachable("unsupported AST node");