diff options
author | Dmitri Gribenko <gribozavr@gmail.com> | 2012-07-06 23:27:33 +0000 |
---|---|---|
committer | Dmitri Gribenko <gribozavr@gmail.com> | 2012-07-06 23:27:33 +0000 |
commit | 9c00676f2393335dc60c61faf944d4f8f622fac6 (patch) | |
tree | e0a61fe89e00ed0bec0728cf7a71bfe92edfe4b9 /lib/AST/ASTContext.cpp | |
parent | 25570a94ca6b706d19812b0f8df25a63ec3445c8 (diff) |
Restrict the set of declaration kinds for which we allow trailing comments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159878 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/ASTContext.cpp')
-rw-r--r-- | lib/AST/ASTContext.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp index 12f1d4de03..a5b624fbec 100644 --- a/lib/AST/ASTContext.cpp +++ b/lib/AST/ASTContext.cpp @@ -99,7 +99,7 @@ const RawComment *ASTContext::getRawCommentForDeclNoCache(const Decl *D) const { // First check whether we have a trailing comment. if (Comment != RawComments.end() && (*Comment)->isDocumentation() && (*Comment)->isTrailingComment() && - !isa<TagDecl>(D) && !isa<NamespaceDecl>(D)) { + (isa<FieldDecl>(D) || isa<EnumConstantDecl>(D) || isa<VarDecl>(D))) { std::pair<FileID, unsigned> CommentBeginDecomp = SourceMgr.getDecomposedLoc((*Comment)->getSourceRange().getBegin()); // Check that Doxygen trailing comment comes after the declaration, starts |