John Thompson
cdb847ba16
Added vecreturn attribute parsing.
...
llvm-svn: 110609
2010-08-09 21:53:52 +00:00
Ted Kremenek
d21139a34f
After a lengthy design discussion, add support for "ownership attributes" for malloc/free checking. Patch by Andrew McGregor!
...
llvm-svn: 109939
2010-07-31 01:52:11 +00:00
Fariborz Jahanian
ef5f621215
Implements Sema part of init_priority(priority) attribute
...
(radar 8076356) - wip.
llvm-svn: 106322
2010-06-18 21:44:06 +00:00
John McCall
61d8258fa3
Roll back r104941.
...
llvm-svn: 104990
2010-05-28 18:25:28 +00:00
John McCall
2177a9b65a
Add a new attribute on records, __attribute__((adl_invisible)), and define
...
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.
llvm-svn: 104941
2010-05-28 08:20:36 +00:00
Ted Kremenek
26bde774df
Add clang support for IBOutletCollection.
...
llvm-svn: 104135
2010-05-19 17:38:06 +00:00
Douglas Gregor
a941dcae16
Add support for Microsoft's __thiscall, from Steven Watanabe!
...
llvm-svn: 104026
2010-05-18 16:57:00 +00:00
Abramo Bagnara
5009937f47
Add calling convention related attributes to related declaration. Mark attributes invalid on type related checking so to add them to declarations only when everything is ok.
...
llvm-svn: 102710
2010-04-30 13:10:51 +00:00
Chris Lattner
a9396af5f2
other half of r101005
...
llvm-svn: 101006
2010-04-12 02:18:49 +00:00
Chris Lattner
817b16fc40
revert r98661, gcc_tdiag is not an attribute (PR6542).
...
Will fix correctly now that I have a testcase
llvm-svn: 99207
2010-03-22 20:59:10 +00:00
Chris Lattner
379e1b9cc9
accept and ignore __gcc_tdiag__ so we don't produce warnings
...
building mainline GCC, PR6542
llvm-svn: 98661
2010-03-16 19:29:19 +00:00
Rafael Espindola
c18086ae17
Add support for the weakref attribute. We still produce "alias weak" as llvm-gcc does, but are more strict on what uses of weakref we accept.
...
llvm-svn: 96992
2010-02-23 22:00:30 +00:00
Ted Kremenek
d9c6663124
Add 'ns_returns_not_retained' and 'cf_returns_not_retained' attributes to
...
match 'ns_returns_retained' and 'cf_returns_retained' respectively. These
are not yet hooked up to the static analyzer.
llvm-svn: 96535
2010-02-18 00:05:45 +00:00
Ted Kremenek
06be968942
Add IBAction attribute to keep the IBOutlet attribute company.
...
llvm-svn: 96447
2010-02-17 02:37:45 +00:00
Alexis Hunt
54a0254887
Parse C++ member check attributes - base_check, hiding, and override.
...
The attributes are currently ignored.
llvm-svn: 89837
2009-11-25 04:20:27 +00:00
Alexis Hunt
96d5c76498
Added rudimentary C++0x attribute support.
...
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)
llvm-svn: 89543
2009-11-21 08:43:09 +00:00
Eli Friedman
e4310c8273
Add support for cdecl attribute. (As far as I know, it doesn't affect CodeGen
...
unless we start implementing command-line switches which override the default
calling convention, so the effect is mostly to silence unknown attribute
warnings.)
llvm-svn: 86571
2009-11-09 18:38:53 +00:00
Douglas Gregor
98261735b4
StringSwitch-ify attribute name mapping.
...
llvm-svn: 85491
2009-10-29 05:26:58 +00:00
Daniel Dunbar
07d0785dbb
PR5218: Replace IdentifierInfo::getName with StringRef version, now that clients
...
are updated.
llvm-svn: 84447
2009-10-18 21:17:35 +00:00
Daniel Dunbar
5bf78579bd
Rewrite AttributeList::getKind to use StringRef API.
...
llvm-svn: 84339
2009-10-17 18:12:29 +00:00
Mike Stump
11289f4280
Remove tabs, and whitespace cleanups.
...
llvm-svn: 81346
2009-09-09 15:08:12 +00:00
Ryan Flynn
1f1fdc070e
map previously ignored __attribute((malloc)) to noalias attribute of llvm function's return
...
llvm-svn: 78541
2009-08-09 20:07:29 +00:00
Nate Begeman
f275870014
OpenCL 1.0 support: attributes
...
llvm-svn: 74280
2009-06-26 06:32:41 +00:00
Eli Friedman
06de2b5525
Add real parsing for __declspec. It doesn't make much of a difference
...
at the moment because we ignore the result.
llvm-svn: 73056
2009-06-08 07:21:15 +00:00
Fariborz Jahanian
f1c25029b4
implementation of format_arg for ObjC methods/functions.
...
Still more to do.
llvm-svn: 72173
2009-05-20 17:41:43 +00:00
Ted Kremenek
669604cded
Add back attribute string lookup for 'ns_returns_retained' and
...
'cf_returns_retained'.
llvm-svn: 71311
2009-05-09 03:08:29 +00:00
Ted Kremenek
062c14ba24
Remove experimental ownership attributes from Clang.
...
llvm-svn: 71216
2009-05-08 15:19:25 +00:00
Ted Kremenek
ba53fe98e7
More attribute renaming:
...
- Rename 'ns_returns_owned' -> 'ns_returns_retained'.
- Rename 'cf_returns_owned' -> 'cf_returns_retained'.
llvm-svn: 71182
2009-05-07 21:49:45 +00:00
Ted Kremenek
213ff5a98e
Implement attribute 'ns_autorelease'.
...
llvm-svn: 70990
2009-05-05 18:44:20 +00:00
Ted Kremenek
94c464ef22
Implement attribute 'cf_returns_owned' (mirrors 'ns_returns_owned').
...
llvm-svn: 70952
2009-05-05 00:46:09 +00:00
Ted Kremenek
de1aa1e4dd
Rename ownership attributes:
...
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
2009-05-05 00:21:59 +00:00
Ted Kremenek
bbec22d2b2
Rename attribute 'ns_ownership_returns' to 'ns_returns_ownership'.
...
llvm-svn: 70941
2009-05-04 23:52:59 +00:00
Ted Kremenek
6bdfcf47ad
Remove experimental attribute 'ns_ownership_make_collectable.'
...
llvm-svn: 70940
2009-05-04 23:46:06 +00:00
Ted Kremenek
0836a19931
Rename attributes 'objc_ownership...' to 'ns_ownership...'.
...
llvm-svn: 70897
2009-05-04 19:10:19 +00:00
Ted Kremenek
5dbfa3fadd
Rename attributes:
...
'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
2009-05-04 17:29:57 +00:00
Ted Kremenek
869292d5b6
Implement ownership attribute 'objc_ownership_make_collectable'. This allows one
...
to add 'CFMakeCollectable' semantics to a method.
llvm-svn: 70336
2009-04-28 22:32:26 +00:00
Ted Kremenek
84bfa2c2dc
Add two new checker-specific attributes: 'objc_ownership_release' and
...
'objc_ownership_cfrelease'. These are the 'release' equivalents of
'objc_ownership_retain' and 'objc_ownership_cfretain' respectively.
llvm-svn: 70235
2009-04-27 19:36:56 +00:00
Ted Kremenek
ebbef7d0d3
Add new checker-specific attribute 'objc_ownership_cfretain'. This is the same
...
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
2009-04-27 18:27:22 +00:00
Chris Lattner
6d7ffe0283
accept an ignore the no_instrument_function attribute. Since we don't
...
support -pg, we never instrument :)
llvm-svn: 70061
2009-04-25 18:44:54 +00:00
Ted Kremenek
e75de95408
Hook up attribute 'objc_ownership_retain' to the analyzer. This attribute allows
...
users to specify that a method's argument is visibly retained (reference count
incremented).
llvm-svn: 70008
2009-04-25 01:21:50 +00:00
Ted Kremenek
2cfd264636
Add new checker-specific attribute 'objc_ownership_retain'. This isn't hooked up
...
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
2009-04-25 00:17:17 +00:00
Ted Kremenek
44e662cd4f
Add new checker-specific attribute 'objc_ownership_returns'. This isn't hooked
...
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
2009-04-24 23:09:54 +00:00
Chris Lattner
ddf6ca0355
the __gnuc_inline__ attribute is actually named __gnu_inline__,
...
PR4023
llvm-svn: 69618
2009-04-20 19:12:28 +00:00
Chris Lattner
eaad6b70a9
recognize the gnuc_inline attribute.
...
llvm-svn: 69044
2009-04-14 16:30:50 +00:00
Chris Lattner
7e0fe4458c
sink abstract typedefs like Action::ExprTy from the Action class
...
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
2009-04-11 18:48:18 +00:00
Ted Kremenek
40f4ee74fd
Implement attribute "analyzer_noreturn" (<rdar://problem/6777003>). This allows
...
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
2009-04-10 00:01:14 +00:00
Fariborz Jahanian
a2d609e2f1
Besides the warning, issue unsupported diagnostics in
...
ir gen. No intended change in functionality.
llvm-svn: 67857
2009-03-27 18:38:55 +00:00
Daniel Dunbar
5cb85ebe94
Add Parse/Sema support for weak_import attribute.
...
- Also, diagnose weak applied to types.
llvm-svn: 66259
2009-03-06 06:39:57 +00:00
Chris Lattner
b5d8416b90
don't new[] an empty array when an AttributeList has
...
zero expression arguments. This eliminates 2579 1-byte
mallocs when parsing Cocoa.h.
llvm-svn: 65022
2009-02-19 06:25:12 +00:00
Chris Lattner
976fdefe2f
gcc spells it "warn_unused_result" (already supported) not "warnunusedresult"
...
llvm-svn: 64849
2009-02-17 23:20:10 +00:00