r176509 - doc parsing. Add @method and @callback for

Dmitri Gribenko gribozavr at gmail.com
Tue Mar 5 12:25:05 PST 2013


On Tue, Mar 5, 2013 at 10:16 PM, jahanian <fjahanian at apple.com> wrote:
> Modified: cfe/trunk/lib/AST/CommentSema.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/CommentSema.cpp?rev=176509&r1=176508&r2=176509&view=diff
> ==============================================================================
> --- cfe/trunk/lib/AST/CommentSema.cpp (original)
> +++ cfe/trunk/lib/AST/CommentSema.cpp Tue Mar  5 13:40:47 2013
> @@ -1,4 +1,4 @@
> -//===--- CommentSema.cpp - Doxygen comment semantic analysis
> --------------===//
> +class//===--- CommentSema.cpp - Doxygen comment semantic analysis
> --------------===//
> //
> //                     The LLVM Compiler Infrastructure
> //
> @@ -91,9 +91,11 @@ ParamCommandComment *Sema::actOnParamCom
> void Sema::checkFunctionDeclVerbatimLine(const BlockCommandComment *Comment)
> {
>   const CommandInfo *Info = Traits.getCommandInfo(Comment->getCommandID());
>   if (Info->IsFunctionDeclarationCommand &&
> -      !isFunctionDecl())
> +      !isFunctionDecl() && !isCallbackDecl())
>     Diag(Comment->getLocation(),
>          diag::warn_doc_function_not_attached_to_a_function_decl)
> +    << Comment->getCommandMarker()
> +    << Info->Name << Info->Name
>     << Comment->getSourceRange();
>
>
> This diagnostic is not as precise as it could be.  For example, it
> would allow @method for a function pointer variable.
>
>
> Yes. I left this out. As it is not urgent at the time.

Please leave a FIXME then.

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 <gribozavr at gmail.com>*/



More information about the cfe-commits mailing list