<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">In r 176525.<div>- fariborz</div><div><br><div><div>On Mar 5, 2013, at 12:24 PM, Dmitri Gribenko <<a href="mailto:gribozavr@gmail.com">gribozavr@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;">On Tue, Mar 5, 2013 at 10:18 PM, jahanian <<a href="mailto:fjahanian@apple.com">fjahanian@apple.com</a>> wrote:<br><blockquote type="cite"><br>On Mar 5, 2013, at 12:10 PM, Dmitri Gribenko <<a href="mailto:gribozavr@gmail.com">gribozavr@gmail.com</a>> wrote:<br><br>On Tue, Mar 5, 2013 at 9:40 PM, Fariborz Jahanian <<a href="mailto:fjahanian@apple.com">fjahanian@apple.com</a>><br>wrote:<br><br>Author: fjahanian<br>Date: Tue Mar  5 13:40:47 2013<br>New Revision: 176509<br><br>URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project?rev=176509&view=rev">http://llvm.org/viewvc/llvm-project?rev=176509&view=rev</a><br>Log:<br>doc parsing. Add @method and @callback for<br>checkings and few other refactoring/cleanup.<br>//<span class="Apple-converted-space"> </span><a href="rdar://13094352">rdar://13094352</a>.<br><br>Modified:<br>  cfe/trunk/include/clang/AST/CommentCommands.td<br>  cfe/trunk/include/clang/AST/CommentSema.h<br>  cfe/trunk/include/clang/Basic/DiagnosticCommentKinds.td<br>  cfe/trunk/lib/AST/CommentParser.cpp<br>  cfe/trunk/lib/AST/CommentSema.cpp<br>  cfe/trunk/test/Sema/warn-documentation.cpp<br>  cfe/trunk/test/Sema/warn-documentation.m<br><br>Modified: cfe/trunk/include/clang/AST/CommentCommands.td<br>URL:<br><a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/CommentCommands.td?rev=176509&r1=176508&r2=176509&view=diff">http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/CommentCommands.td?rev=176509&r1=176508&r2=176509&view=diff</a><br>==============================================================================<br>--- cfe/trunk/include/clang/AST/CommentCommands.td (original)<br>+++ cfe/trunk/include/clang/AST/CommentCommands.td Tue Mar  5 13:40:47 2013<br>@@ -187,8 +187,8 @@ def Protocol  : DeclarationVerbatimLineC<br>def Category  : DeclarationVerbatimLineCommand<"category">;<br>def Template  : DeclarationVerbatimLineCommand<"template">;<br>def Function  : FunctionDeclarationVerbatimLineCommand<"function">;<br>-def Method    : DeclarationVerbatimLineCommand<"method">;<br>-def Callback  : DeclarationVerbatimLineCommand<"callback">;<br>+def Method    : FunctionDeclarationVerbatimLineCommand<"method">;<br>+def Callback  : FunctionDeclarationVerbatimLineCommand<"callback">;<br>def Const     : DeclarationVerbatimLineCommand<"const">;<br>def Constant  : DeclarationVerbatimLineCommand<"constant">;<br>def Struct    : DeclarationVerbatimLineCommand<"struct">;<br><br>Modified: cfe/trunk/include/clang/AST/CommentSema.h<br>URL:<br><a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/CommentSema.h?rev=176509&r1=176508&r2=176509&view=diff">http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/CommentSema.h?rev=176509&r1=176508&r2=176509&view=diff</a><br>==============================================================================<br>--- cfe/trunk/include/clang/AST/CommentSema.h (original)<br>+++ cfe/trunk/include/clang/AST/CommentSema.h Tue Mar  5 13:40:47 2013<br>@@ -206,6 +206,7 @@ public:<br> void resolveParamCommandIndexes(const FullComment *FC);<br><br> bool isFunctionDecl();<br>+  bool isCallbackDecl();<br><br><br>Please add a documentation comment that this function returns true for<br>variables that are function pointers.  Or rename it to<br>isFunctionPointerVarDecl() -- the latter is better, IMHO.<br><br> bool isObjCPropertyDecl();<br> bool isTemplateOrSpecialization();<br><br><br>Modified: cfe/trunk/include/clang/Basic/DiagnosticCommentKinds.td<br>URL:<br><a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticCommentKinds.td?rev=176509&r1=176508&r2=176509&view=diff">http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticCommentKinds.td?rev=176509&r1=176508&r2=176509&view=diff</a><br>==============================================================================<br>--- cfe/trunk/include/clang/Basic/DiagnosticCommentKinds.td (original)<br>+++ cfe/trunk/include/clang/Basic/DiagnosticCommentKinds.td Tue Mar  5<br>13:40:47 2013<br>@@ -74,8 +74,8 @@ def warn_doc_param_not_attached_to_a_fun<br> InGroup<Documentation>, DefaultIgnore;<br><br>def warn_doc_function_not_attached_to_a_function_decl : Warning<<br>-  "'@function' command used in a comment that is attached to "<br>-  "a non-function declaration immediately following it">,<br>+  "'%select{\\|@}0%1' command used in a comment that is attached to a<br>non-%2 "<br>+  "declaration immediately following it">,<br><br><br>Please replace %2 with %select.  We should not pass translatable<br>strings from .cpp into diagnostics.  Or you could also reword the text<br><br><br>Why not? I have seen it being done all the time. Can you point to a coding<br>standard ?<br></blockquote><br>That code should be fixed then, too :)<br><br>It is not in the coding standard, but in the documentation:<br><br><a href="http://clang.llvm.org/docs/InternalsManual.html#the-format-string">http://clang.llvm.org/docs/InternalsManual.html#the-format-string</a><br><br><blockquote type="cite">Diagnostics should never take random English strings as arguments: you shouldn’t use “you have a problem with %0” and pass in things like “your argument” or “your return value” as arguments.<br></blockquote><br>Dmitri<br><br>--<span class="Apple-converted-space"> </span><br>main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if<br>(j){printf("%d\n",i);}}} /*Dmitri Gribenko <<a href="mailto:gribozavr@gmail.com">gribozavr@gmail.com</a>>*/</div></blockquote></div><br></div></body></html>