Added support for enums in Value<>

This commit is contained in:
Jack Andersen 2015-08-20 11:57:20 -10:00
parent 7464c8e5eb
commit 9655cb41d1
1 changed files with 12 additions and 0 deletions

View File

@ -126,6 +126,12 @@ class ATDNAEmitVisitor : public clang::RecursiveASTVisitor<ATDNAEmitVisitor>
const std::string& funcPrefix, bool& isDNATypeOut)
{
isDNATypeOut = false;
if (theType->isEnumeralType())
{
clang::EnumType* eType = (clang::EnumType*)theType;
clang::EnumDecl* eDecl = eType->getDecl();
theType = eDecl->getIntegerType().getCanonicalType().getTypePtr();
}
if (writerPass)
{
if (theType->isBuiltinType())
@ -276,6 +282,12 @@ class ATDNAEmitVisitor : public clang::RecursiveASTVisitor<ATDNAEmitVisitor>
bool writerPass, bool& isDNATypeOut)
{
isDNATypeOut = false;
if (theType->isEnumeralType())
{
clang::EnumType* eType = (clang::EnumType*)theType;
clang::EnumDecl* eDecl = eType->getDecl();
theType = eDecl->getIntegerType().getCanonicalType().getTypePtr();
}
if (writerPass)
{
if (theType->isBuiltinType())