summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/AST/ASTContext.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp
index 0b771745fd5..b0cea14788b 100644
--- a/clang/lib/AST/ASTContext.cpp
+++ b/clang/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;
}
OpenPOWER on IntegriCloud