<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On Mar 4, 2013, at 5:23 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;"><span></span>On Tuesday, March 5, 2013, Fariborz Jahanian wrote:<br><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;">Author: fjahanian<br>Date: Mon Mar  4 19:05:07 2013<br>New Revision: 176468<br><br>URL:<span class="Apple-converted-space"> </span><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>//<span class="Apple-converted-space"> </span><a href="rdar://13094352">rdar://13094352</a><br><br>Modified:<br>   <span class="Apple-converted-space"> </span>cfe/trunk/include/clang/AST/CommentCommandTraits.h<br>   <span class="Apple-converted-space"> </span>cfe/trunk/include/clang/AST/CommentCommands.td<br>   <span class="Apple-converted-space"> </span>cfe/trunk/include/clang/AST/CommentSema.h<br>   <span class="Apple-converted-space"> </span>cfe/trunk/include/clang/Basic/DiagnosticCommentKinds.td<br>   <span class="Apple-converted-space"> </span>cfe/trunk/lib/AST/CommentParser.cpp<br>   <span class="Apple-converted-space"> </span>cfe/trunk/lib/AST/CommentSema.cpp<br>   <span class="Apple-converted-space"> </span>cfe/trunk/test/Sema/warn-documentation.cpp<br>   <span class="Apple-converted-space"> </span>cfe/trunk/utils/TableGen/ClangCommentCommandInfoEmitter.cpp<br><br>Modified: cfe/trunk/include/clang/AST/CommentCommandTraits.h<br>URL:<span class="Apple-converted-space"> </span><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:<span class="Apple-converted-space"> </span><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">;</blockquote><div><br></div><div>Do we want the same warning for \method and \callback?</div></div></blockquote>In r176509.</div><div><br></div><div>- fariborz</div><div><br></div><br></body></html>