diff options
Diffstat (limited to 'lib/AST/ASTContext.cpp')
-rw-r--r-- | lib/AST/ASTContext.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp index 0b771745fd..b0cea14788 100644 --- a/lib/AST/ASTContext.cpp +++ b/lib/AST/ASTContext.cpp @@ -434,6 +434,16 @@ comments::FullComment *ASTContext::getCommentForDecl( } } } + else if (const TypedefDecl *TD = dyn_cast<TypedefDecl>(D)) { + QualType QT = TD->getUnderlyingType(); + if (const EnumType *ET = QT->getAs<EnumType>()) { + if (const EnumDecl *ED = ET->getDecl()) + if (comments::FullComment *FC = getCommentForDecl(ED, PP)) { + comments::FullComment *CFC = cloneFullComment(FC, D); + return CFC; + } + } + } return NULL; } |