Use QualType::getAsString(PrintingPolicy&) to honor bool output option

This commit is contained in:
Luke Street 2020-04-17 14:21:30 -04:00
parent 3c5b138306
commit 1aa27c7289
1 changed files with 1 additions and 5 deletions

View File

@ -262,11 +262,7 @@ class ATDNAEmitVisitor : public clang::RecursiveASTVisitor<ATDNAEmitVisitor> {
templateStmt += ", ";
qualType += ", ";
}
if (nonTypeParm->getType()->isBooleanType()) {
templateStmt += std::string("bool ") + nonTypeParm->getName().str();
} else {
templateStmt += nonTypeParm->getType().getAsString().append(1, ' ').append(nonTypeParm->getName().str());
}
templateStmt += nonTypeParm->getType().getAsString(context.getPrintingPolicy()).append(1, ' ').append(nonTypeParm->getName().str());
qualType += nonTypeParm->getName();
needsComma = true;
}