summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/AttributeList.cpp
Commit message (Collapse)AuthorAgeFilesLines
* StringSwitch-ify attribute name mapping.Douglas Gregor2009-10-291-90/+55
| | | | llvm-svn: 85491
* PR5218: Replace IdentifierInfo::getName with StringRef version, now that clientsDaniel Dunbar2009-10-181-1/+1
| | | | | | are updated. llvm-svn: 84447
* Rewrite AttributeList::getKind to use StringRef API.Daniel Dunbar2009-10-171-8/+5
| | | | llvm-svn: 84339
* Remove tabs, and whitespace cleanups.Mike Stump2009-09-091-9/+9
| | | | llvm-svn: 81346
* map previously ignored __attribute((malloc)) to noalias attribute of llvm ↵Ryan Flynn2009-08-091-1/+1
| | | | | | function's return llvm-svn: 78541
* OpenCL 1.0 support: attributesNate Begeman2009-06-261-0/+3
| | | | llvm-svn: 74280
* Add real parsing for __declspec. It doesn't make much of a difference Eli Friedman2009-06-081-2/+2
| | | | | | at the moment because we ignore the result. llvm-svn: 73056
* implementation of format_arg for ObjC methods/functions.Fariborz Jahanian2009-05-201-2/+1
| | | | | | Still more to do. llvm-svn: 72173
* Add back attribute string lookup for 'ns_returns_retained' andTed Kremenek2009-05-091-0/+4
| | | | | | 'cf_returns_retained'. llvm-svn: 71311
* Remove experimental ownership attributes from Clang.Ted Kremenek2009-05-081-9/+0
| | | | llvm-svn: 71216
* More attribute renaming:Ted Kremenek2009-05-071-4/+4
| | | | | | | - 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/+1
| | | | llvm-svn: 70990
* Implement attribute 'cf_returns_owned' (mirrors 'ns_returns_owned').Ted Kremenek2009-05-051-0/+1
| | | | llvm-svn: 70952
* Rename ownership attributes:Ted Kremenek2009-05-051-14/+7
| | | | | | | | | | 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-4/+0
| | | | llvm-svn: 70940
* Rename attributes 'objc_ownership...' to 'ns_ownership...'.Ted Kremenek2009-05-041-11/+9
| | | | llvm-svn: 70897
* Rename attributes:Ted Kremenek2009-05-041-8/+8
| | | | | | | | | | | '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
* Implement ownership attribute 'objc_ownership_make_collectable'. This allows oneTed Kremenek2009-04-281-0/+4
| | | | | | to add 'CFMakeCollectable' semantics to a method. llvm-svn: 70336
* Add two new checker-specific attributes: 'objc_ownership_release' andTed Kremenek2009-04-271-1/+7
| | | | | | | 'objc_ownership_cfrelease'. These are the 'release' equivalents of 'objc_ownership_retain' and 'objc_ownership_cfretain' respectively. llvm-svn: 70235
* Add new checker-specific attribute 'objc_ownership_cfretain'. This is the sameTed Kremenek2009-04-271-0/+5
| | | | | | | | 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
* accept an ignore the no_instrument_function attribute. Since we don'tChris Lattner2009-04-251-0/+2
| | | | | | support -pg, we never instrument :) llvm-svn: 70061
* Hook up attribute 'objc_ownership_retain' to the analyzer. This attribute allowsTed Kremenek2009-04-251-1/+1
| | | | | | | users to specify that a method's argument is visibly retained (reference count incremented). llvm-svn: 70008
* Add new checker-specific attribute 'objc_ownership_retain'. This isn't hooked upTed Kremenek2009-04-251-0/+3
| | | | | | | | 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/+4
| | | | | | | 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
* the __gnuc_inline__ attribute is actually named __gnu_inline__,Chris Lattner2009-04-201-1/+1
| | | | | | PR4023 llvm-svn: 69618
* recognize the gnuc_inline attribute.Chris Lattner2009-04-141-0/+1
| | | | llvm-svn: 69044
* sink abstract typedefs like Action::ExprTy from the Action classChris Lattner2009-04-111-3/+4
| | | | | | | | | | | down to the ActionBase class. This eliminates dependencies of (e.g.) DeclSpec.h on Action.h, meaning that action.h can now include these headers and use their types directly in the actions interfaces. This is a refactoring to support a future change, no functionality change. llvm-svn: 68869
* Implement attribute "analyzer_noreturn" (<rdar://problem/6777003>). This allowsTed Kremenek2009-04-101-0/+1
| | | | | | | 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
* Besides the warning, issue unsupported diagnostics in Fariborz Jahanian2009-03-271-0/+1
| | | | | | ir gen. No intended change in functionality. llvm-svn: 67857
* Add Parse/Sema support for weak_import attribute.Daniel Dunbar2009-03-061-0/+1
| | | | | | - Also, diagnose weak applied to types. llvm-svn: 66259
* don't new[] an empty array when an AttributeList has Chris Lattner2009-02-191-5/+9
| | | | | | | zero expression arguments. This eliminates 2579 1-byte mallocs when parsing Cocoa.h. llvm-svn: 65022
* gcc spells it "warn_unused_result" (already supported) not "warnunusedresult"Chris Lattner2009-02-171-3/+0
| | | | llvm-svn: 64849
* just ignore hte format_arg attribute for now, it doesn't have any semantic ↵Chris Lattner2009-02-141-2/+4
| | | | | | implications. llvm-svn: 64547
* add parser and type checking support for attribute((objc_exception)).Chris Lattner2009-02-141-0/+3
| | | | | | | We don't have "zero cost" exceptions for ObjC yet, so there is no codegen support required. llvm-svn: 64546
* Several related changes: Chris Lattner2009-02-141-0/+3
| | | | | | | | | | | | | | | 1) implement parser and sema support for reading and verifying attribute(warnunusedresult). 2) rename hasLocalSideEffect to isUnusedResultAWarning, inverting the sense of its result. 3) extend isUnusedResultAWarning to directly return the loc and range info that should be reported to the user. Make it substantially more precise in some cases than what was previously reported. 4) teach isUnusedResultAWarning about CallExpr to decls that are pure/const/warnunusedresult, fixing a fixme. 5) change warn_attribute_wrong_decl_type to not pass in english strings, instead, pass in integers and use %select. llvm-svn: 64543
* Don't ignore the const attribute - we even have CG support for that. Do ↵Anders Carlsson2009-02-141-2/+2
| | | | | | ignore the malloc attribute however. llvm-svn: 64538
* ignore the const attribute for now.Chris Lattner2009-02-141-0/+1
| | | | llvm-svn: 64536
* Sema/AST support for attribute used. Patch by Anders Johnson (with small ↵Daniel Dunbar2009-02-131-0/+1
| | | | | | tweaks & test case)! llvm-svn: 64478
* Add a new Ignored attribute type, and use it for may_alias.Anders Carlsson2009-02-131-0/+1
| | | | llvm-svn: 64446
* Add sema support for the nodebug attribute.Anders Carlsson2009-02-131-0/+1
| | | | llvm-svn: 64441
* Support __attribute__(section(<name>))Daniel Dunbar2009-02-121-2/+3
| | | | llvm-svn: 64380
* Initial implementation of function overloading in C.Douglas Gregor2009-02-111-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds a new attribute, "overloadable", that enables C++ function overloading in C. The attribute can only be added to function declarations, e.g., int *f(int) __attribute__((overloadable)); If the "overloadable" attribute exists on a function with a given name, *all* functions with that name (and in that scope) must have the "overloadable" attribute. Sets of overloaded functions with the "overloadable" attribute then follow the normal C++ rules for overloaded functions, e.g., overloads must have different parameter-type-lists from each other. When calling an overloaded function in C, we follow the same overloading rules as C++, with three extensions to the set of standard conversions: - A value of a given struct or union type T can be converted to the type T. This is just the identity conversion. (In C++, this would go through a copy constructor). - A value of pointer type T* can be converted to a value of type U* if T and U are compatible types. This conversion has Conversion rank (it's considered a pointer conversion in C). - A value of type T can be converted to a value of type U if T and U are compatible (and are not both pointer types). This conversion has Conversion rank (it's considered to be a new kind of conversion unique to C, a "compatible" conversion). Known defects (and, therefore, next steps): 1) The standard-conversion handling does not understand conversions involving _Complex or vector extensions, so it is likely to get these wrong. We need to add these conversions. 2) All overloadable functions with the same name will have the same linkage name, which means we'll get a collision in the linker (if not sooner). We'll need to mangle the names of these functions. llvm-svn: 64336
* Implement Declarator::getSourceRange().Sebastian Redl2009-02-091-1/+1
| | | | llvm-svn: 64151
* Add sema support for the cleanup attribute.Anders Carlsson2009-01-311-0/+1
| | | | llvm-svn: 63462
* Implemenent objective-c's NSObject attribute as a way of ddeclaraing c-typeFariborz Jahanian2009-01-131-0/+1
| | | | | | objects as an objective-c object. llvm-svn: 62197
* Semantics of @protocol attributes.Fariborz Jahanian2008-12-171-0/+1
| | | | llvm-svn: 61114
* Add attribute always_inline support.Daniel Dunbar2008-10-281-0/+1
| | | | llvm-svn: 58304
* Add parsing of the sentinel attribute. Still need to create the attribute.Anders Carlsson2008-10-051-0/+1
| | | | llvm-svn: 57121
* Finish pushing blocks attribute through the clang attribute machinery.Steve Naroff2008-09-181-0/+1
| | | | | | Also added a couple simple tests from the "gcc.apple" test suite. llvm-svn: 56309
OpenPOWER on IntegriCloud