aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/ASTContext.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2013-01-26 20:49:30 +0000
committerFariborz Jahanian <fjahanian@apple.com>2013-01-26 20:49:30 +0000
commit87611cdd0c1a8e5648d63e141f471644c6f7dc64 (patch)
tree8d69477608ce30ffb098147b5ef3081931190572 /lib/AST/ASTContext.cpp
parent5694feb5ccd6eb862cb600b55753cecc13794471 (diff)
Attach any tag type's documentation to its typedef if
latter does not have one of its own. // rdar://13067629 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173586 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/ASTContext.cpp')
-rw-r--r--lib/AST/ASTContext.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp
index 7ba64e32f3..9107307700 100644
--- a/lib/AST/ASTContext.cpp
+++ b/lib/AST/ASTContext.cpp
@@ -431,9 +431,9 @@ comments::FullComment *ASTContext::getCommentForDecl(
// Attach enum's documentation to its typedef if latter
// does not have one of its own.
QualType QT = TD->getUnderlyingType();
- if (const EnumType *ET = QT->getAs<EnumType>())
- if (const EnumDecl *ED = ET->getDecl())
- if (comments::FullComment *FC = getCommentForDecl(ED, PP))
+ if (const TagType *TT = QT->getAs<TagType>())
+ if (const Decl *TD = TT->getDecl())
+ if (comments::FullComment *FC = getCommentForDecl(TD, PP))
return cloneFullComment(FC, D);
}
return NULL;