[PATCH] D42850: [docs] Add guidance on duplicating doc comments to CodingStandards
Chris Lattner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 5 21:25:18 PST 2018
lattner added a comment.
Personally, I don't see the harm in duplicating the comments, and they are useful when you're not using doxygen or some other tool. You're talking about the overriden method situation, but another common one is when you define a class in an anonymous namespace and then implement it later in the same file. The implementation should certainly have a doc comment on it, and if it helps to understand the overview of what the struct is doing, then it makes sense to document it in the class definition as well.
Yes, of course the comments can get out of date, but so can code. I haven't heard of this being a code maintenance problem in practice.
-Chris
Repository:
rL LLVM
https://reviews.llvm.org/D42850
More information about the llvm-commits
mailing list