r179180 - Add an option to parse all comments as documentation comments
Dmitri Gribenko
gribozavr at gmail.com
Wed Apr 10 11:45:57 PDT 2013
On Wed, Apr 10, 2013 at 8:51 PM, jahanian <fjahanian at apple.com> wrote:
>
> On Apr 10, 2013, at 8:35 AM, Dmitri Gribenko <gribozavr at gmail.com> wrote:
>> /// Returns true if this comment is not a documentation comment.
>> bool isOrdinary() const LLVM_READONLY {
>> - return (Kind == RCK_OrdinaryBCPL) || (Kind == RCK_OrdinaryC);
>> + return ((Kind == RCK_OrdinaryBCPL) || (Kind == RCK_OrdinaryC)) &&
>> + !ParseAllComments;
>> }
>>
>> /// Returns true if this comment any kind of a documentation comment.
>> bool isDocumentation() const LLVM_READONLY {
>> - return !isInvalid() && !isOrdinary();
>> + return !isInvalid() && (!isOrdinary() || ParseAllComments);
>
> It seems to me check for ParseAllComments is unnecessary here. It has been pushed into
> IsOrdinary().
Logic is a bit tricky here. I have convinced myself that the check is
redundant by constructing a truth table and adding test cases.
Committed r179204, thanks.
Dmitri
--
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/
More information about the cfe-commits
mailing list