On Jul 11, 2012, at 14:39 , Dmitri Gribenko <[email protected]> wrote:

>> +  if (!ThisDecl || ThisDecl->getKind() != Decl::Function)
>> +    Diag(Command->getLocation(),
>> +         diag::warn_doc_param_not_attached_to_a_function_decl);
>> 
>> This test is wrong; not only will it not catch ObjCMethodDecls (as Doug 
>> already mentioned), but it doesn't work for any subclasses of FunctionDecl 
>> either. You'll need to use isa<FunctionDecl> || isa<ObjCMethodDecl> to 
>> properly handle subclasses.
>> 
>> (ObjCMethodDecl doesn't have any subclasses right now, so if you really 
>> don't want to include DeclObjC.h you can get away with using getKind() for 
>> that one.)
> 
> Done, but please look at the tests (test/Sema/warn-documentation.m).
> Anything else worth adding?

Seems reasonable to me, at least for now. When you start hooking up links and 
\sa we'll need more test cases here, of course.
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to