Revert r326501 due to buildbot breakage.
authorDavid L. Jones <dlj@google.com>
Thu, 1 Mar 2018 23:14:00 +0000 (23:14 +0000)
committerDavid L. Jones <dlj@google.com>
Thu, 1 Mar 2018 23:14:00 +0000 (23:14 +0000)
commite78dfe5f550c618e8671241e2464d0065c6faf67
treebd1e3d6cac73369884aaa46667aefe9622aa648a
parentcdd5fb5087c91b45626c699e5357ae46b0f7d8a9
Revert r326501 due to buildbot breakage.

Original change:

[NFC] Move CommentOpts checks to the call sites that depend on it.

When parsing comments, for example, for -Wdocumentation, slightly different
behaviour occurs when -fparse-all-comments is specified. However, these
differences are subtle:

1. All comments are saved during parsing, regardless of whether they are doc comments or not.
2. "Maybe-doc" comments, like //<, //!, etc, are saved as such, instead of marking them as ordinary comments. The maybe-doc type of comment is never saved otherwise. (Warning on these is the impetus of -Wdocumentation.)
3. All comments are treated as doc comments in ASTContext, even if they are ordinary.

This change moves the logic for checking CommentOptions.ParseAllComments closer
to where it has an effect. The overall logic is unchanged, but checks of the
ParseAllComments flag are now done where the effect will be clearer.

llvm-svn: 326508
clang/include/clang/AST/ASTContext.h
clang/include/clang/AST/RawCommentList.h
clang/lib/AST/ASTContext.cpp
clang/lib/AST/RawCommentList.cpp
clang/lib/Sema/Sema.cpp
clang/lib/Serialization/ASTReader.cpp