zarko added inline comments. ================ Comment at: lib/AST/ASTContext.cpp:233-234 @@ -205,3 +232,4 @@ if (Comment != RawComments.end() && - (*Comment)->isDocumentation() && (*Comment)->isTrailingComment() && + ((*Comment)->isParseAllComments() || + ((*Comment)->isDocumentation() && (*Comment)->isTrailingComment())) && (isa<FieldDecl>(D) || isa<EnumConstantDecl>(D) || isa<VarDecl>(D) || ---------------- rsmith wrote: > If the comment is a documentation comment but doesn't use the trailing > comment syntax, what does your patch do? For instance: > > enum E { > A, /// Comment about A or B? > B > }; > > The comment is recognized and attached to B outside parse-all-comments mode, > so it should presumably mean the same thing in parse-all-comments mode, as > broken as that is. As the patch was written, the documentation would get attached to both A and B. I've changed strategies and now try to guess whether an ordinary comment is trailing or not (and whether that should be merged); behavior for cases like the one you've indicated is documented and checked in parse-all-comments.c.
http://reviews.llvm.org/D11069 _______________________________________________ cfe-commits mailing list cfe-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits