summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDeclAttr.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix rdar://6881069, a crash on a form of vector_size that weChris Lattner2009-05-131-1/+2
| | | | | | | | | don't support. While it would be nice to support this eventually, this form is not common at all (just seen in gcc testsuite) and it might be better to model vector_size as a type attribute anyway. For now just emit a nice error on it. llvm-svn: 71633
* Add back Parse/Sema support for attributes cf_returns_retained andTed Kremenek2009-05-091-0/+44
| | | | | | | ns_returns_retained, but do not include the other ownership attributes we previously had. llvm-svn: 71308
* Remove experimental ownership attributes from Clang.Ted Kremenek2009-05-081-101/+0
| | | | llvm-svn: 71216
* More attribute renaming:Ted Kremenek2009-05-071-8/+8
| | | | | | | - Rename 'ns_returns_owned' -> 'ns_returns_retained'. - Rename 'cf_returns_owned' -> 'cf_returns_retained'. llvm-svn: 71182
* Implement attribute 'ns_autorelease'.Ted Kremenek2009-05-051-0/+6
| | | | llvm-svn: 70990
* Implement attribute 'cf_returns_owned' (mirrors 'ns_returns_owned').Ted Kremenek2009-05-051-10/+37
| | | | llvm-svn: 70952
* Rename ownership attributes:Ted Kremenek2009-05-051-18/+18
| | | | | | | | | | ns_ownership_returns -> ns_returns_owned ns_ownership_retain -> ns_retains ns_ownership_release -> ns_releases cf_ownership_retain -> cf_retains cf_ownership_release -> cf_releases llvm-svn: 70949
* Rename attribute 'ns_ownership_returns' to 'ns_returns_ownership'.Ted Kremenek2009-05-041-2/+2
| | | | llvm-svn: 70941
* Remove experimental attribute 'ns_ownership_make_collectable.'Ted Kremenek2009-05-041-5/+0
| | | | llvm-svn: 70940
* ignore weak_import attribute on objc method decls.Fariborz Jahanian2009-05-041-2/+2
| | | | llvm-svn: 70901
* Rename attributes 'objc_ownership...' to 'ns_ownership...'.Ted Kremenek2009-05-041-23/+23
| | | | llvm-svn: 70897
* Rename attributes:Ted Kremenek2009-05-041-10/+10
| | | | | | | | | | | 'objc_ownership_cfretain' -> 'cf_ownership_retain' 'objc_ownership_cfrelease' -> 'cf_ownership_release' Motivation: Core Foundation objects can be used in isolation from Objective-C, and this forces users to reason about the separate semantics of CF objects. More Sema support pending. llvm-svn: 70884
* Remove support for ObjCMethodDecl attributes that appear between theTed Kremenek2009-05-041-34/+0
| | | | | | | | return type and the selector. This is inconsistent with C functions (where such attributes would be placed on the return type, not the the FunctionDecl), and is inconsistent with what people are use to seeing. llvm-svn: 70878
* Allow attributes 'objc_ownership_retain' and 'objc_ownership_release' to beTed Kremenek2009-04-301-5/+7
| | | | | | | applied to ObjCMethodDecls, not just parameters. This allows one to specific side-effects on the receiver of a message expression. No checker support yet. llvm-svn: 70505
* Hook up Sema support for attributes on Objective-C method declarations thatTed Kremenek2009-04-301-1/+33
| | | | | | | | | | | | | appear between the return type and the selector. This is a separate code path from regular attribute processing, as we only want to (a) accept only a specific set of attributes in this place and (b) want to distinguish to clients the context in which an attribute was added to an ObjCMethodDecl. Currently, the attribute 'objc_ownership_returns' is the only attribute that uses this new feature. Shortly I will add a warning for 'objc_ownership_returns' to be placed at the end of a method declaration. llvm-svn: 70504
* Implement semantic analysis for transparent unions. This is largelyDouglas Gregor2009-04-291-18/+45
| | | | | | | based on a patch from Anders Johnsen. CodeGen support is incomplete, in that we do not properly coerce to the first field's type. llvm-svn: 70419
* Sema and CodeGen support for attributes on blocks. Radar 6441502Mike Stump2009-04-291-4/+7
| | | | llvm-svn: 70403
* Implement ownership attribute 'objc_ownership_make_collectable'. This allows oneTed Kremenek2009-04-281-10/+15
| | | | | | to add 'CFMakeCollectable' semantics to a method. llvm-svn: 70336
* Improve compatibility with GCC regarding inline semantics in GNU89Douglas Gregor2009-04-281-5/+1
| | | | | | | | | | | mode and in the presence of __gnu_inline__ attributes. This should fix both PR3989 and PR4069. As part of this, we now keep track of all of the attributes attached to each declaration even after we've performed declaration merging. This fixes PR3264. llvm-svn: 70292
* Add two new checker-specific attributes: 'objc_ownership_release' andTed Kremenek2009-04-271-0/+10
| | | | | | | 'objc_ownership_cfrelease'. These are the 'release' equivalents of 'objc_ownership_retain' and 'objc_ownership_cfretain' respectively. llvm-svn: 70235
* Refactor HandleObjCOwnershipRetainAttr and HandleObjCOwnershipCFRetainAttr intoTed Kremenek2009-04-271-19/+26
| | | | | | HandleObjCOwnershipParmAttr. No functionality change (hopefully). llvm-svn: 70224
* Add new checker-specific attribute 'objc_ownership_cfretain'. This is the sameTed Kremenek2009-04-271-0/+14
| | | | | | | | as 'objc_ownership_cfretain' except that the method acts like a CFRetain instead of a [... retain] (important in GC modes). Checker support is wired up, but currently only for Objective-C message expressions (not function calls). llvm-svn: 70218
* Correct the order of the parameters to CheckAssignmentConstraints in Eli Friedman2009-04-261-1/+1
| | | | | | | cleanup attribute checking. The difference isn't normally visible, but it can make a difference... llvm-svn: 70104
* accept an ignore the no_instrument_function attribute. Since we don'tChris Lattner2009-04-251-0/+1
| | | | | | support -pg, we never instrument :) llvm-svn: 70061
* Add new checker-specific attribute 'objc_ownership_retain'. This isn't hooked upTed Kremenek2009-04-251-0/+14
| | | | | | | | to the checker yet, but essentially it allows a user to specify that an Objective-C method or C function increments the reference count of a passed object. llvm-svn: 70005
* Add new checker-specific attribute 'objc_ownership_returns'. This isn't hookedTed Kremenek2009-04-241-0/+21
| | | | | | | up to the checker yet, but essentially it allows a user to specify that an Objective-C method or C function returns an owned an Objective-C object. llvm-svn: 70001
* Fix handling of C99 "extern inline" semantics when dealing withDouglas Gregor2009-04-231-1/+5
| | | | | | | multiple declarations of the function. Should fix PR3989 and <rdar://problem/6818429>. llvm-svn: 69905
* Fix some mishandling of the attr(gnu_inline) mode when used withChris Lattner2009-04-221-5/+0
| | | | | | | | | | extern. Previously we would warn about it and ignore the attribute. This is incorrect, it should be handled as a c89 "extern inline" function. Many thanks to Matthieu Castet for pointing this out and beating me over the head until I got it. PR3988: extern inline function are not externally visible llvm-svn: 69756
* the __gnuc_inline__ attribute is actually named __gnu_inline__,Chris Lattner2009-04-201-6/+6
| | | | | | PR4023 llvm-svn: 69618
* FunctionDecl::getBody() is getting an ASTContext argument for use inDouglas Gregor2009-04-181-1/+1
| | | | | | | | lazy PCH deserialization. Propagate that argument wherever it needs to be. No functionality change, except that I've tightened up a few PCH tests in preparation. llvm-svn: 69406
* implement some sema for gnuc_inline attribute. Reject always_inline and ↵Chris Lattner2009-04-141-5/+15
| | | | | | no_inline on objc methods. llvm-svn: 69051
* recognize the gnuc_inline attribute.Chris Lattner2009-04-141-0/+17
| | | | llvm-svn: 69044
* Implement attribute "analyzer_noreturn" (<rdar://problem/6777003>). This allowsTed Kremenek2009-04-101-5/+19
| | | | | | | clients of the analyzer to designate custom assertion routines as "noreturn" functions from the analyzer's perspective but not the compiler's. llvm-svn: 68746
* Propagate the ASTContext to various AST traversal and lookup functions.Douglas Gregor2009-04-091-2/+2
| | | | | | No functionality change (really). llvm-svn: 68726
* Extend possible handled regparm(N) valueAnton Korobeynikov2009-04-041-1/+1
| | | | llvm-svn: 68424
* Basic support for regparm codegenAnton Korobeynikov2009-04-041-1/+0
| | | | llvm-svn: 68414
* Provide sema proper values of maximal number of arguments passed in registers.Anton Korobeynikov2009-04-031-7/+6
| | | | llvm-svn: 68413
* Finish off semantic analysis for regparm, and remove the warning. Also Eli Friedman2009-03-271-8/+27
| | | | | | remove a redundant error in CodeGen. llvm-svn: 67868
* Besides the warning, issue unsupported diagnostics in Fariborz Jahanian2009-03-271-0/+20
| | | | | | ir gen. No intended change in functionality. llvm-svn: 67857
* Be sure to not add weak import, if we are ignoring it.Mike Stump2009-03-181-0/+1
| | | | llvm-svn: 67214
* Ignore weak import on properties.Mike Stump2009-03-181-0/+2
| | | | llvm-svn: 67205
* don't crash when sentinel attribute is used on function without a prototype,Chris Lattner2009-03-171-2/+9
| | | | | | discovered as part of PR3817 llvm-svn: 67127
* Add Parse/Sema support for weak_import attribute.Daniel Dunbar2009-03-061-0/+38
| | | | | | - Also, diagnose weak applied to types. llvm-svn: 66259
* Switch attributes to be allocated from the declcontext bump pointer just likeChris Lattner2009-03-041-39/+39
| | | | | | | decls. This reduces the number of calls to malloc on cocoa.h with pth and -disable-free from 15958 to 12444 times (down ~3500). llvm-svn: 66023
* PR3691: Add support for complex modes. I also tossed in support for XF Eli Friedman2009-03-031-17/+45
| | | | | | | | while I was at it. There are still a lot of diagnostics missing from this code, and it isn't completely correct for anything other than x86, but it should work correctly on x86 for valid cases. llvm-svn: 65935
* Create a new TypeNodes.def file that enumerates all of the types,Douglas Gregor2009-02-261-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | giving them rough classifications (normal types, never-canonical types, always-dependent types, abstract type representations) and making it far easier to make sure that we've hit all of the cases when decoding types. Switched some switch() statements on the type class over to using this mechanism, and filtering out those things we don't care about. For example, CodeGen should never see always-dependent or non-canonical types, while debug info generation should never see always-dependent types. More switch() statements on the type class need to be moved over to using this approach, so that we'll get warnings when we add a new type then fail to account for it somewhere in the compiler. As part of this, some types have been renamed: TypeOfExpr -> TypeOfExprType FunctionTypeProto -> FunctionProtoType FunctionTypeNoProto -> FunctionNoProtoType There shouldn't be any functionality change... llvm-svn: 65591
* Use CheckAssignmentConstraints for checking the cleanup attr function. Fixes ↵Anders Carlsson2009-02-251-1/+1
| | | | | | PR3656. llvm-svn: 65461
* remove some more methods from objc decls, using the iteratorChris Lattner2009-02-201-12/+7
| | | | | | interfaces more consistently. llvm-svn: 65138
* Add sema support for the noinline attribute.Anders Carlsson2009-02-191-1/+24
| | | | llvm-svn: 65055
* __attribute__((aligned)) was being ignored!Daniel Dunbar2009-02-181-1/+2
| | | | | | This knocks out another 8 gcc/compat/i386 & x86_64 failures. llvm-svn: 64947
OpenPOWER on IntegriCloud