[llvm] r189704 - Remove the suggestion to not duplicate comments in header and

David Blaikie dblaikie at gmail.com
Fri Aug 30 16:41:30 PDT 2013


On Fri, Aug 30, 2013 at 4:34 PM, Chris Lattner <clattner at apple.com> wrote:
> On Aug 30, 2013, at 4:24 PM, Benjamin Kramer <benny.kra at gmail.com> wrote:
>> On 31.08.2013, at 01:06, Chris Lattner <sabre at nondot.org> wrote:
>>
>>> Author: lattner
>>> Date: Fri Aug 30 18:06:20 2013
>>> New Revision: 189704
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=189704&view=rev
>>> Log:
>>> Remove the suggestion to not duplicate comments in header and
>>> implementation files.  While doc generation systems don't need this,
>>> humans do benefit from it.  Not everyone reads all code through doxygen.
>>
>> I disagree.
>
> I expected this to start a discussion… this is good because the discussion never happened when gribozavr "Document current Doxygen use practices in Coding Standards" in r166378.

Actually it did:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20120910/150633.html

>
>> The big problem with duplicated comments is that now not just one comment gets out of date but we get two comments that diverge over time. I've seen this happening in LLVM several times. That alone is enough reason for not duplicating the comment.
>>
>> While it's true that few people actually read code through doxygen there are many tools (*cough* clang *cough*) that can consume doxygen comments and I hope that the usual editors will grow plugins that display them through libclang.
>
> I'm not fan of the comments diverging, and have seen this as well.  That said, not everyone uses Xcode or other libclang enabled tools.
>
> If you're passionate about solving this problem, why not enhance -Wdocumentation in clang to check that the two comment match up?




More information about the llvm-commits mailing list