<br><br>On Tuesday, March 5, 2013, jahanian  wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><div>On Mar 4, 2013, at 5:25 PM, Dmitri Gribenko <<a>gribozavr@gmail.com</a>> wrote:</div>
<br><blockquote type="cite"><br><br>On Tuesday, March 5, 2013, Fariborz Jahanian  wrote:<br><blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: fjahanian<br>
Date: Mon Mar  4 19:05:07 2013<br>
New Revision: 176468<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=176468&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=176468&view=rev</a><br>
Log:<br>
doc parsing. We want to issue a strong warning when<br>
an @function comment is not followed by a function decl.<br>
// <a>rdar://13094352</a><br>
<br>
Modified:<br>
    cfe/trunk/include/clang/AST/CommentCommandTraits.h<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/utils/TableGen/ClangCommentCommandInfoEmitter.cpp<br>
<br>
Modified: cfe/trunk/include/clang/AST/CommentCommandTraits.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/CommentCommandTraits.h?rev=176468&r1=176467&r2=176468&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/CommentCommandTraits.h?rev=176468&r1=176467&r2=176468&view=diff</a><br>


==============================================================================<br>
--- cfe/trunk/include/clang/AST/CommentCommandTraits.h (original)<br>
+++ cfe/trunk/include/clang/AST/CommentCommandTraits.h Mon Mar  4 19:05:07 2013<br>
@@ -100,7 +100,10 @@ struct CommandInfo {<br>
   ///   \fn void f(int a);<br>
   /// \endcode<br>
   unsigned IsDeclarationCommand : 1;<br>
-<br>
+<br>
+  /// \brief True if verbatim-like line command is a function declaraton.<br>
+  unsigned IsFunctionDeclarationCommand : 1;<br>
+<br>
   /// \brief True if this command is unknown.  This \c CommandInfo object was<br>
   /// created during parsing.<br>
   unsigned IsUnknownCommand : 1;<br>
<br>
Modified: cfe/trunk/include/clang/AST/CommentCommands.td<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/CommentCommands.td?rev=176468&r1=176467&r2=176468&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/CommentCommands.td?rev=176468&r1=176467&r2=176468&view=diff</a><br>


==============================================================================<br>
--- cfe/trunk/include/clang/AST/CommentCommands.td (original)<br>
+++ cfe/trunk/include/clang/AST/CommentCommands.td Mon Mar  4 19:05:07 2013<br>
@@ -24,6 +24,7 @@ class Command<string name> {<br>
   bit IsVerbatimBlockEndCommand = 0;<br>
   bit IsVerbatimLineCommand = 0;<br>
   bit IsDeclarationCommand = 0;<br>
+  bit IsFunctionDeclarationCommand = 0;<br>
 }<br>
<br>
 class InlineCommand<string name> : Command<name> {<br>
@@ -59,6 +60,12 @@ class DeclarationVerbatimLineCommand<str<br>
   let IsDeclarationCommand = 1;<br>
 }<br>
<br>
+class FunctionDeclarationVerbatimLineCommand<string name> :<br>
+      VerbatimLineCommand<name> {<br>
+  let IsDeclarationCommand = 1;<br>
+  let IsFunctionDeclarationCommand = 1;<br>
+}<br>
+<br>
 //===----------------------------------------------------------------------===//<br>
 // InlineCommand<br>
 //===----------------------------------------------------------------------===//<br>
@@ -179,7 +186,7 @@ def Interface : DeclarationVerbatimLineC<br>
 def Protocol  : DeclarationVerbatimLineCommand<"protocol">;<br>
 def Category  : DeclarationVerbatimLineCommand<"category">;<br>
 def Template  : DeclarationVerbatimLineCommand<"template">;<br>
-def Function  : DeclarationVerbatimLineCommand<"function">;<br>
+def Function  : FunctionDeclarationVerbatimLineCommand<"function">;<br>
 def Method    : DeclarationVerbatimLineCommand<"method">;<br>
 def Callback  : DeclarationVerbatimLineCommand<"callback">;<br>
 def Const     : DeclarationVerbatimLineCommand<"const">;<br>
<br>
Modified: cfe/trunk/include/clang/AST/CommentSema.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/CommentSema.h?rev=176468&r1=176467&r2=176468&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/CommentSema.h?rev=176468&r1=176467&r2=176468&view=diff</a><br>


=============================================================</blockquote></blockquote>There is no \function AFAIK.</div></div></blockquote><div><br></div><div>While this might be the case for HeaderDoc, there is \function in Doxygen, and we handle both of <span></span>these in an identical way.</div>
<div><br></div><div>Dmitri</div><div><br></div><br><br>-- <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" target="_blank">gribozavr@gmail.com</a>>*/<br>