diff options
author | Brad King <brad.king@kitware.com> | 2017-09-28 10:59:54 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-09-28 11:14:15 (GMT) |
commit | bbe3117a26ad11ba74a8f2c3f0a38bf3ef9864bb (patch) | |
tree | d58d858b4dea372c56954f7dd7b57f6f2911a32b /src/Output.cxx | |
parent | e51382fbcccc390a25d90f2103838c6e979e7e30 (diff) | |
download | CastXML-bbe3117a26ad11ba74a8f2c3f0a38bf3ef9864bb.zip CastXML-bbe3117a26ad11ba74a8f2c3f0a38bf3ef9864bb.tar.gz CastXML-bbe3117a26ad11ba74a8f2c3f0a38bf3ef9864bb.tar.bz2 |
Output: Desugar 'auto' types
When an `auto` type is encountered in an interface, desugar it
through to the deduced type.
Issue: #89
Diffstat (limited to 'src/Output.cxx')
-rw-r--r-- | src/Output.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Output.cxx b/src/Output.cxx index aaf058b..1c820d6 100644 --- a/src/Output.cxx +++ b/src/Output.cxx @@ -729,6 +729,12 @@ ASTVisitor::DumpId ASTVisitor::AddTypeDumpNode(DumpType dt, bool complete, return this->AddTypeDumpNode( DumpType(t->getAs<clang::AttributedType>()->getEquivalentType(), c), complete, dq); + case clang::Type::Auto: { + clang::AutoType const* at = t->getAs<clang::AutoType>(); + if (at->isSugared()) { + return this->AddTypeDumpNode(DumpType(at->desugar(), c), complete, dq); + } + } break; case clang::Type::Decayed: return this->AddTypeDumpNode( DumpType(t->getAs<clang::DecayedType>()->getDecayedType(), c), |