mirror of https://github.com/libAthena/athena.git
Added support for enums in Value<>
This commit is contained in:
parent
7464c8e5eb
commit
9655cb41d1
|
@ -126,6 +126,12 @@ class ATDNAEmitVisitor : public clang::RecursiveASTVisitor<ATDNAEmitVisitor>
|
||||||
const std::string& funcPrefix, bool& isDNATypeOut)
|
const std::string& funcPrefix, bool& isDNATypeOut)
|
||||||
{
|
{
|
||||||
isDNATypeOut = false;
|
isDNATypeOut = false;
|
||||||
|
if (theType->isEnumeralType())
|
||||||
|
{
|
||||||
|
clang::EnumType* eType = (clang::EnumType*)theType;
|
||||||
|
clang::EnumDecl* eDecl = eType->getDecl();
|
||||||
|
theType = eDecl->getIntegerType().getCanonicalType().getTypePtr();
|
||||||
|
}
|
||||||
if (writerPass)
|
if (writerPass)
|
||||||
{
|
{
|
||||||
if (theType->isBuiltinType())
|
if (theType->isBuiltinType())
|
||||||
|
@ -276,6 +282,12 @@ class ATDNAEmitVisitor : public clang::RecursiveASTVisitor<ATDNAEmitVisitor>
|
||||||
bool writerPass, bool& isDNATypeOut)
|
bool writerPass, bool& isDNATypeOut)
|
||||||
{
|
{
|
||||||
isDNATypeOut = false;
|
isDNATypeOut = false;
|
||||||
|
if (theType->isEnumeralType())
|
||||||
|
{
|
||||||
|
clang::EnumType* eType = (clang::EnumType*)theType;
|
||||||
|
clang::EnumDecl* eDecl = eType->getDecl();
|
||||||
|
theType = eDecl->getIntegerType().getCanonicalType().getTypePtr();
|
||||||
|
}
|
||||||
if (writerPass)
|
if (writerPass)
|
||||||
{
|
{
|
||||||
if (theType->isBuiltinType())
|
if (theType->isBuiltinType())
|
||||||
|
|
Loading…
Reference in New Issue