return;
}
- auto printDesc = [&OS, &Ctx](Descriptor *Desc) {
- if (auto *D = Desc->asDecl()) {
+ auto printDesc = [&OS, &Ctx](const Descriptor *Desc) {
+ if (const auto *D = Desc->asDecl()) {
// Subfields or named values.
- if (auto *VD = dyn_cast<ValueDecl>(D)) {
+ if (const auto *VD = dyn_cast<ValueDecl>(D)) {
OS << *VD;
return;
}
// Base classes.
- if (isa<RecordDecl>(D)) {
+ if (isa<RecordDecl>(D))
return;
- }
}
// Temporary expression.
- if (auto *E = Desc->asExpr()) {
+ if (const auto *E = Desc->asExpr()) {
E->printPretty(OS, nullptr, Ctx.getPrintingPolicy());
return;
}