diff options
Diffstat (limited to 'clang/lib/AST/Comment.cpp')
-rw-r--r-- | clang/lib/AST/Comment.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/clang/lib/AST/Comment.cpp b/clang/lib/AST/Comment.cpp index f88e9e212e3..89a7b7fa902 100644 --- a/clang/lib/AST/Comment.cpp +++ b/clang/lib/AST/Comment.cpp @@ -226,12 +226,15 @@ void DeclInfo::fill() { case Decl::Namespace: Kind = NamespaceKind; break; + case Decl::TypeAlias: case Decl::Typedef: { Kind = TypedefKind; - // If this is a typedef to something we consider a function, extract + // If this is a typedef / using to something we consider a function, extract // arguments and return type. - const TypedefDecl *TD = cast<TypedefDecl>(CommentDecl); - const TypeSourceInfo *TSI = TD->getTypeSourceInfo(); + const TypeSourceInfo *TSI = + K == Decl::Typedef + ? cast<TypedefDecl>(CommentDecl)->getTypeSourceInfo() + : cast<TypeAliasDecl>(CommentDecl)->getTypeSourceInfo(); if (!TSI) break; TypeLoc TL = TSI->getTypeLoc().getUnqualifiedLoc(); @@ -302,9 +305,6 @@ void DeclInfo::fill() { } break; } - case Decl::TypeAlias: - Kind = TypedefKind; - break; case Decl::TypeAliasTemplate: { const TypeAliasTemplateDecl *TAT = cast<TypeAliasTemplateDecl>(CommentDecl); Kind = TypedefKind; |