[cfe-commits] r64441 - in /cfe/trunk: include/clang/AST/Attr.h include/clang/Parse/AttributeList.h lib/Parse/AttributeList.cpp lib/Sema/SemaDeclAttr.cpp test/Sema/attr-nodebug.c

Anders Carlsson andersca at mac.com
Fri Feb 13 00:03:32 PST 2009


12 feb 2009 kl. 23.08 skrev Chris Lattner:

> On Feb 12, 2009, at 10:46 PM, Anders Carlsson wrote:
>> URL: http://llvm.org/viewvc/llvm-project?rev=64441&view=rev
>> Log:
>> Add sema support for the nodebug attribute.
>
> Is nodebug a type or decl attribute?  It seems that it would apply  
> to decls,

It's for function decls only -

   FunctionDecl *Fn = dyn_cast<FunctionDecl>(d);
   if (!Fn) {
     S.Diag(Attr.getLoc(), diag::warn_attribute_wrong_decl_type)
       << "nodebug" << "function";
     return;
   }

(I know, I know - I'll change it to isa<> :)




More information about the cfe-commits mailing list