From 3c5b138306f2def73afd836660145467ba206f8d Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Fri, 17 Apr 2020 11:11:01 -0700 Subject: [PATCH] Fix `_Bool` error --- atdna/main.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/atdna/main.cpp b/atdna/main.cpp index 0becc78..55035af 100644 --- a/atdna/main.cpp +++ b/atdna/main.cpp @@ -262,7 +262,11 @@ class ATDNAEmitVisitor : public clang::RecursiveASTVisitor { templateStmt += ", "; qualType += ", "; } - templateStmt += nonTypeParm->getType().getAsString().append(1, ' ').append(nonTypeParm->getName().str()); + if (nonTypeParm->getType()->isBooleanType()) { + templateStmt += std::string("bool ") + nonTypeParm->getName().str(); + } else { + templateStmt += nonTypeParm->getType().getAsString().append(1, ' ').append(nonTypeParm->getName().str()); + } qualType += nonTypeParm->getName(); needsComma = true; }