From 1aa27c728963add720fbc18b9d1e05da88d505a6 Mon Sep 17 00:00:00 2001 From: Luke Street Date: Fri, 17 Apr 2020 14:21:30 -0400 Subject: [PATCH] Use QualType::getAsString(PrintingPolicy&) to honor bool output option --- atdna/main.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/atdna/main.cpp b/atdna/main.cpp index 55035af..d2a2ac6 100644 --- a/atdna/main.cpp +++ b/atdna/main.cpp @@ -262,11 +262,7 @@ class ATDNAEmitVisitor : public clang::RecursiveASTVisitor { 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; }