aboutsummaryrefslogtreecommitdiff
path: root/lib/Parse/AttributeList.cpp
AgeCommit message (Collapse)Author
2010-08-20Another step in the process of making the parser depend on Sema:John McCall
- move DeclSpec &c into the Sema library - move ParseAST into the Parse library Reflect this change in a thousand different includes. Reflect this change in the link orders. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111667 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-09Added vecreturn attribute parsing.John Thompson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110609 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-31After a lengthy design discussion, add support for "ownership attributes" ↵Ted Kremenek
for malloc/free checking. Patch by Andrew McGregor! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109939 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-18Implements Sema part of init_priority(priority) attributeFariborz Jahanian
(radar 8076356) - wip. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106322 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-28Roll back r104941.John McCall
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104990 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-28Add a new attribute on records, __attribute__((adl_invisible)), and defineJohn McCall
the x86-64 __va_list_tag with this attribute. The attribute causes the affected type to behave like a fundamental type when considered by ADL. (x86-64 is the only target we currently provide with a struct-based __builtin_va_list) Fixes PR6762. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104941 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-19Add clang support for IBOutletCollection.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104135 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-18Add support for Microsoft's __thiscall, from Steven Watanabe!Douglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104026 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-30Add calling convention related attributes to related declaration. Mark ↵Abramo Bagnara
attributes invalid on type related checking so to add them to declarations only when everything is ok. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102710 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-12other half of r101005Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101006 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-22revert r98661, gcc_tdiag is not an attribute (PR6542).Chris Lattner
Will fix correctly now that I have a testcase git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99207 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-16accept and ignore __gcc_tdiag__ so we don't produce warningsChris Lattner
building mainline GCC, PR6542 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98661 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-23Add support for the weakref attribute. We still produce "alias weak" as ↵Rafael Espindola
llvm-gcc does, but are more strict on what uses of weakref we accept. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96992 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-18Add 'ns_returns_not_retained' and 'cf_returns_not_retained' attributes toTed Kremenek
match 'ns_returns_retained' and 'cf_returns_retained' respectively. These are not yet hooked up to the static analyzer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96535 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-17Add IBAction attribute to keep the IBOutlet attribute company.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96447 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-25Parse C++ member check attributes - base_check, hiding, and override.Sean Hunt
The attributes are currently ignored. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89837 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-21Added rudimentary C++0x attribute support.Sean Hunt
The following attributes are currently supported in C++0x attribute lists (and in GNU ones as well): - align() - semantics believed to be conformant to n3000, except for redeclarations and what entities it may apply to - final - semantics believed to be conformant to CWG issue 817's proposed wording, except for redeclarations - noreturn - semantics believed to be conformant to n3000, except for redeclarations - carries_dependency - currently ignored (this is an optimization hint) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89543 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-09Add support for cdecl attribute. (As far as I know, it doesn't affect CodeGenEli Friedman
unless we start implementing command-line switches which override the default calling convention, so the effect is mostly to silence unknown attribute warnings.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86571 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-29StringSwitch-ify attribute name mapping.Douglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85491 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-18PR5218: Replace IdentifierInfo::getName with StringRef version, now that clientsDaniel Dunbar
are updated. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84447 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-17Rewrite AttributeList::getKind to use StringRef API.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84339 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-09Remove tabs, and whitespace cleanups.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81346 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-09map previously ignored __attribute((malloc)) to noalias attribute of llvm ↵Ryan Flynn
function's return git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78541 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-26OpenCL 1.0 support: attributesNate Begeman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74280 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-08Add real parsing for __declspec. It doesn't make much of a difference Eli Friedman
at the moment because we ignore the result. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73056 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-20implementation of format_arg for ObjC methods/functions.Fariborz Jahanian
Still more to do. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72173 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-09Add back attribute string lookup for 'ns_returns_retained' andTed Kremenek
'cf_returns_retained'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71311 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-08Remove experimental ownership attributes from Clang.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71216 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-07More attribute renaming:Ted Kremenek
- Rename 'ns_returns_owned' -> 'ns_returns_retained'. - Rename 'cf_returns_owned' -> 'cf_returns_retained'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71182 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-05Implement attribute 'ns_autorelease'.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70990 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-05Implement attribute 'cf_returns_owned' (mirrors 'ns_returns_owned').Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70952 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-05Rename ownership attributes:Ted Kremenek
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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70949 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-04Rename attribute 'ns_ownership_returns' to 'ns_returns_ownership'.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70941 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-04Remove experimental attribute 'ns_ownership_make_collectable.'Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70940 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-04Rename attributes 'objc_ownership...' to 'ns_ownership...'.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70897 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-04Rename attributes:Ted Kremenek
'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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70884 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-28Implement ownership attribute 'objc_ownership_make_collectable'. This allows oneTed Kremenek
to add 'CFMakeCollectable' semantics to a method. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70336 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-27Add two new checker-specific attributes: 'objc_ownership_release' andTed Kremenek
'objc_ownership_cfrelease'. These are the 'release' equivalents of 'objc_ownership_retain' and 'objc_ownership_cfretain' respectively. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70235 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-27Add new checker-specific attribute 'objc_ownership_cfretain'. This is the sameTed Kremenek
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). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70218 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-25accept an ignore the no_instrument_function attribute. Since we don'tChris Lattner
support -pg, we never instrument :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70061 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-25Hook up attribute 'objc_ownership_retain' to the analyzer. This attribute allowsTed Kremenek
users to specify that a method's argument is visibly retained (reference count incremented). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70008 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-25Add new checker-specific attribute 'objc_ownership_retain'. This isn't hooked upTed Kremenek
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70005 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-24Add new checker-specific attribute 'objc_ownership_returns'. This isn't hookedTed Kremenek
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70001 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-20the __gnuc_inline__ attribute is actually named __gnu_inline__,Chris Lattner
PR4023 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69618 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-14recognize the gnuc_inline attribute.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69044 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-11sink abstract typedefs like Action::ExprTy from the Action classChris Lattner
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68869 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-10Implement attribute "analyzer_noreturn" (<rdar://problem/6777003>). This allowsTed Kremenek
clients of the analyzer to designate custom assertion routines as "noreturn" functions from the analyzer's perspective but not the compiler's. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68746 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-27Besides the warning, issue unsupported diagnostics in Fariborz Jahanian
ir gen. No intended change in functionality. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67857 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-06Add Parse/Sema support for weak_import attribute.Daniel Dunbar
- Also, diagnose weak applied to types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66259 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-19don't new[] an empty array when an AttributeList has Chris Lattner
zero expression arguments. This eliminates 2579 1-byte mallocs when parsing Cocoa.h. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65022 91177308-0d34-0410-b5e6-96231b3b80d8