Hello, @Doug: CC'ing you since you requested this.
The attached patch adds a warning for cases like:
/// Aaa
/// \deprecated
void test_deprecated_4(int a);
That is, comment has \deprecated but declaration does not have a
deprecation attribute (deprecated or unavailable).
This warning is under a separate flag,
-Wdocumentation-deprecated-not-sync, so it can be turned off easily
while leaving other -Wdocumentation warnings on.
I did not add a fix-it note because it would appear inconsistently:
1. in case the comment is attached to a declaration we can emit a fix-it easily;
2. in case the comment is attached to the function declaration that is
a definition, a whole new declaration needs to be added (because gcc
does not allow attributes on a function definition).
I don't think that we need to add a warning with reverse logic about
missing \deprecated, since documentation processing tools based on
clang should be smart enough to look at attributes.
Please review.
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 <[email protected]>*/
deprecated-not-sync-v1.patch
Description: Binary data
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
