e53ac8aea2d9e8bbb11191398ea3cc2edb2d171a |
|
07-Mar-2012 |
Michael Han <Michael.Han@autodesk.com> |
Refactor Clang sema attribute handling. This submission improves Clang sema handling by using Clang tablegen to generate common boilerplate code. As a start, it implements AttributeList enumerator generation and case statements for AttributeList::getKind. A new field "SemaHandler" is introduced in Attr.td and by default set to 1 as most of attributes in Attr.td have semantic checking in Sema. For a small number of attributes that don't appear in Sema, the value is set to 0. Also there are a small number of attributes that only appear in Sema but not in Attr.td. Currently these attributes are still hardcoded in Sema AttributeList. Reviewed by Delesley Hutchins. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152169 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/AttributeList.cpp
|
5297d71e8c85f9b04dc31c690e91c6a2f7eddb90 |
|
25-Feb-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Accept __has_feature(__feature__) as a synonym for __has_feature(feature) (and likewise for __has_extension). Patch by Jonathan Sauer! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151445 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/AttributeList.cpp
|
71efba0bbafaefab14419fbd284efff5f7acade7 |
|
24-Jan-2012 |
Kostya Serebryany <kcc@google.com> |
The following patch adds __attribute__((no_address_safety_analysis)) which will allow to disable address safety analysis (such as e.g. AddressSanitizer or SAFECode) for a specific function. When building with AddressSanitizer, add AddressSafety function attribute to every generated function except for those that have __attribute__((no_address_safety_analysis)). With this patch we will be able to 1. disable AddressSanitizer for a particular function 2. disable AddressSanitizer-hostile optimizations (such as some cases of load widening) when AddressSanitizer is on. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148842 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/AttributeList.cpp
|
71207fc0470e1eee40a2951cd5cc3ff47725b755 |
|
05-Jan-2012 |
Ted Kremenek <kremenek@apple.com> |
After further discussion, rename attribute 'objc_disable_automatic_synthesis' to 'objc_requires_property_definitions'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147622 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/AttributeList.cpp
|
22f18fd72d1a2205afdfa6a975b75cd76ef40f3a |
|
05-Jan-2012 |
Ted Kremenek <kremenek@apple.com> |
Rename attribute 'objc_suppress_autosynthesis' to 'objc_disable_automatic_synthesis'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147567 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/AttributeList.cpp
|
e23dcf3524fe01208cc79e707412f0a5dd8eed7b |
|
03-Jan-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objc: introduce objc_suppress_autosynthesis class attributes for later use. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147457 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/AttributeList.cpp
|
f87cced71a955dca5731e7b28bc182e4824c0355 |
|
03-Oct-2011 |
Rafael Espindola <rafael.espindola@gmail.com> |
Propagate __attribute__((returns_twice)) from C to IL. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141002 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/AttributeList.cpp
|
8dfac0baaf0f81d3945bcb306480e358ba8d1f08 |
|
30-Sep-2011 |
John McCall <rjmccall@apple.com> |
Add explicit attributes to mark functions as having had their CoreFoundation object-transfer properties audited, and add a #pragma to cause them to be automatically applied to functions in a particular span of code. This has to be implemented largely in the preprocessor because of the requirement that the region be entirely contained in a single file; that's hard to impose from the parser without registering for a ton of callbacks. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140846 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/AttributeList.cpp
|
fe98da0fa352462c02db037360788748f95466f7 |
|
29-Sep-2011 |
John McCall <rjmccall@apple.com> |
Add an ns_bridged attribute, used to specify that a pointer to the annotated struct type can be used as an Objective-C object pointer. If an argument is given, the type is actually "toll-free bridged" to the specific type named there, rather than just to 'id'. For now, we cannot rely on all types being so annotated, and we'll always have to have exceptions for things like CFTypeRef (aka const void*), but this is clearly a good foundation for improving toolage in this area. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140779 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/AttributeList.cpp
|
db33e14661c7a118a2d9a777ae69c0ecaa036e1e |
|
28-Jul-2011 |
Caitlin Sadowski <supertri@google.com> |
Added basic parsing for all remaining attributes, thread safety analysis. This includes checking that the attributes are applied in the correct contexts and with the correct number of arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136383 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/AttributeList.cpp
|
fdde9e719ad75e656a1475a36b06c2f88f0957cc |
|
28-Jul-2011 |
Caitlin Sadowski <supertri@google.com> |
Added parsing for guarded_var, pt_guarded_var, lockable, scoped_lockable, and no_thread_safety_analysis attributes, all for thread safety analysis git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136364 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/AttributeList.cpp
|
5f9e272e632e951b1efe824cd16acb4d96077930 |
|
23-Jul-2011 |
Chris Lattner <sabre@nondot.org> |
remove unneeded llvm:: namespace qualifiers on some core types now that LLVM.h imports them into the clang namespace. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135852 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/AttributeList.cpp
|
dc7c5ad7a15914b7ae24f31f18a20ad2f8ecd0bc |
|
22-Jul-2011 |
John McCall <rjmccall@apple.com> |
Document the existing objc_precise_lifetime attribute. Introduce and document a new objc_returns_inner_pointer attribute, and consume it by performing a retain+autorelease on message receivers when they're not immediately loaded from an object with precise lifetime. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135764 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/AttributeList.cpp
|
742352a3984aeef9ecf911be23e673e97b34595f |
|
06-Jul-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc-arc: Support objc_arc_weak_unavailable on those classes which are incompatible with weak references. // rdar://9693477 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134522 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/AttributeList.cpp
|
b8b0313e84700b5c6d597b3be4de41c97b7550f1 |
|
24-Jun-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Rename objc_lifetime -> objc_ownership, and modify diagnostics to talk about 'ownership', not 'lifetime'. rdar://9477613. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133779 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/AttributeList.cpp
|
f85e193739c953358c865005855253af4f68a497 |
|
16-Jun-2011 |
John McCall <rjmccall@apple.com> |
Automatic Reference Counting. Language-design credit goes to a lot of people, but I particularly want to single out Blaine Garst and Patrick Beard for their contributions. Compiler implementation credit goes to Argyrios, Doug, Fariborz, and myself, in no particular order. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133103 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/AttributeList.cpp
|
c1a0a73c1fad684dd23e9aade02c4e00dbaeaee6 |
|
26-Apr-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Add ms_struct attribute on record typee (and ignore it for now) - wip. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130224 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/AttributeList.cpp
|
414d8967e1d760ea1e19a4aca96b13777a8cf8c5 |
|
14-Apr-2011 |
Anton Korobeynikov <asl@math.spbu.ru> |
Implement ARM pcs attribute. Basically it's another way of calling convention selection (AAPCS or AAPCS+VFP), similar to fastcall / stdcall / whatevercall seen on x86. In particular, all library functions should always be AAPCS regardless of floating point ABI used. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129534 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/AttributeList.cpp
|
0b7e678a11ece4288dc01aebb5b17e5eef8f8d2d |
|
24-Mar-2011 |
John McCall <rjmccall@apple.com> |
Insomniac refactoring: change how the parser allocates attributes so that AttributeLists do not accumulate over the lifetime of parsing, but are instead reused. Also make the arguments array not require a separate allocation, and make availability attributes store their stuff in augmented memory, too. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128209 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/AttributeList.cpp
|
0a0d2b179085a52c10402feebeb6db8b4d96a140 |
|
23-Mar-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement a new 'availability' attribute, that allows one to specify which versions of an OS provide a certain facility. For example, void foo() __attribute__((availability(macosx,introduced=10.2,deprecated=10.4,obsoleted=10.6))); says that the function "foo" was introduced in 10.2, deprecated in 10.4, and completely obsoleted in 10.6. This attribute ties in with the deployment targets (e.g., -mmacosx-version-min=10.1 specifies that we want to deploy back to Mac OS X 10.1). There are several concrete behaviors that this attribute enables, as illustrated with the function foo() above: - If we choose a deployment target >= Mac OS X 10.4, uses of "foo" will result in a deprecation warning, as if we had placed attribute((deprecated)) on it (but with a better diagnostic) - If we choose a deployment target >= Mac OS X 10.6, uses of "foo" will result in an "unavailable" warning (in C)/error (in C++), as if we had placed attribute((unavailable)) on it - If we choose a deployment target prior to 10.2, foo() is weak-imported (if it is a kind of entity that can be weak imported), as if we had placed the weak_import attribute on it. Naturally, there can be multiple availability attributes on a declaration, for different platforms; only the current platform matters when checking availability attributes. The only platforms this attribute currently works for are "ios" and "macosx", since we already have -mxxxx-version-min flags for them and we have experience there with macro tricks translating down to the deprecated/unavailable/weak_import attributes. The end goal is to open this up to other platforms, and even extension to other "platforms" that are really libraries (say, through a #pragma clang define_system), but that hasn't yet been designed and we may want to shake out more issues with this narrower problem first. Addresses <rdar://problem/6690412>. As a drive-by bug-fix, if an entity is both deprecated and unavailable, we only emit the "unavailable" diagnostic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128127 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/AttributeList.cpp
|
207f4d8543529221932af82836016a2ef066c917 |
|
18-Mar-2011 |
Peter Collingbourne <peter@pcc.me.uk> |
Add support for language-specific address spaces. On top of that, add support for the OpenCL __private, __local, __constant and __global address spaces, as well as the __read_only, _read_write and __write_only image access specifiers. Patch originally by ARM; language-specific address space support by myself. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127915 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/AttributeList.cpp
|
d5313b0bbf3948fe7c63bf46a7da330c96d07309 |
|
02-Mar-2011 |
John McCall <rjmccall@apple.com> |
Provide an attribute, objc_method_family, to allow the inferred family of an Objective-C method to be overridden on a case-by-case basis. This is a higher-level tool than ns_returns_retained &c.; it lets users specify that not only does a method have different retain/release semantics, but that it semantically acts differently than one might assume from its name. This in turn is quite useful to static analysis. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126839 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/AttributeList.cpp
|
cd5b306f1b79c8a82fb0bdb4cf353021ea452fed |
|
18-Feb-2011 |
Chris Lattner <sabre@nondot.org> |
accept and ignore a few things for better OpenBSD compatibility, patch by Amit Kulkarni! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125944 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/AttributeList.cpp
|
f315fa81eef1977b3457fd7a7d4639e060fe7278 |
|
14-Feb-2011 |
Peter Collingbourne <peter@pcc.me.uk> |
OpenCL: add support for __kernel, kernel keywords and EXTENSION, FP_CONTRACT pragmas. Patch originally by ARM. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125475 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/AttributeList.cpp
|
b7ee2e5cc999a45ec4fd7b879477816714aabb7e |
|
27-Jan-2011 |
Jeffrey Yasskin <jyasskin@google.com> |
Revert r124217 because it didn't catch the actual error case it was trying to catch: lock_guard(my_mutex); declares a variable instead of creating a temporary. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124398 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/AttributeList.cpp
|
c60e13aeff96515d27638129154b1308c15ded3d |
|
25-Jan-2011 |
Jeffrey Yasskin <jyasskin@google.com> |
Add an attribute to forbid temporary instances of a type. This allows class authors to write class __attribute__((forbid_temporaries)) Name { ... }; when they want to force users to name all variables of the type. This protects people from doing things like creating a scoped_lock that only lives for a single statement instead of an entire scope. The warning produced by this attribute can be disabled by -Wno-forbid-temporaries. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124217 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/AttributeList.cpp
|
c7ad38168d329d778e884a8b6400bcbed8dc85ee |
|
25-Jan-2011 |
John McCall <rjmccall@apple.com> |
Add the ns_consumes_self, ns_consumed, cf_consumed, and ns_returns_autoreleased attributes for the benefit of the static analyzer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124174 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/AttributeList.cpp
|
15e14a289583616e582a23b320933e846a742626 |
|
23-Jan-2011 |
Anders Carlsson <andersca@mac.com> |
Get rid of [[hiding]], [[override]] and [[base_check]]. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124087 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/AttributeList.cpp
|
f89e0424b8903438179f4a2f16dddd5e5bdc814e |
|
23-Jan-2011 |
Anders Carlsson <andersca@mac.com> |
Get rid of the [[final]] C++0x attribute. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124083 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/AttributeList.cpp
|
7f040a9d817cd1c72b565e92abff473510bf9e1d |
|
24-Dec-2010 |
John McCall <rjmccall@apple.com> |
Refactor how we collect attributes during parsing, and add slots for attributes on array and function declarators. This is pretty far from complete, and I'll revisit it later if someone doesn't beat me to it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122535 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/AttributeList.cpp
|
11542141e385859df6b4f1a8f1f01856ad193b5b |
|
19-Dec-2010 |
Francois Pichet <pichet2000@gmail.com> |
Add support for the Microsoft uuid attribute: example: struct __declspec(uuid("6d5140c1-7436-11ce-8034-00aa006009fa")) test { }; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122173 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/AttributeList.cpp
|
7b381985353304a7723acb05911ff91634fa1f27 |
|
13-Dec-2010 |
Peter Collingbourne <peter@pcc.me.uk> |
Basic, Sema: add support for CUDA launch_bounds attribute git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121654 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/AttributeList.cpp
|
a6cf1e709b96865210b81bd611d41e9a2d41500a |
|
02-Dec-2010 |
Eric Christopher <echristo@apple.com> |
Add support for the common and nocommon attributes. rdar://8560647 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120650 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/AttributeList.cpp
|
ced7671c18e115ac3c3f54abfaaafcc6d33edc4c |
|
01-Dec-2010 |
Peter Collingbourne <peter@pcc.me.uk> |
Basic, Sema: add support for CUDA location attributes git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120545 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/AttributeList.cpp
|
34c26300b384286c544e0b9fd45e7a3648ac79e3 |
|
17-Nov-2010 |
Dan Gohman <gohman@apple.com> |
Front-end support for __attribute__((may_alias)). This is not yet hooked up to anything yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119407 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/AttributeList.cpp
|
4211bb68cff1f310be280f66a59520548ef99d8f |
|
16-Nov-2010 |
Bob Wilson <bob.wilson@apple.com> |
Add support for "neon_vector_type" and "neon_polyvector_type" attributes to create the special Neon vector types. These are intended to be used in Clang's version of <arm_neon.h> to define special Neon vector types that will be mangled according to ARM's ABI. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119301 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/AttributeList.cpp
|
8113ecfa4e41e2c888b1794389dfe3bce6386493 |
|
10-Nov-2010 |
Ted Kremenek <kremenek@apple.com> |
Region-allocate all AttributeList objects from a factory object instead of manually managing them using new/delete and OwningPtrs. After memory profiling Clang, I witnessed periodic leaks of these objects; digging deeper into the code, it was clear that our management of these objects was a mess. The ownership rules were murky at best, and not always followed. Worse, there are plenty of error paths where we could screw up. This patch introduces AttributeList::Factory, which is a factory class that creates AttributeList objects and then blows them away all at once. While conceptually simple, most of the changes in this patch just have to do with migrating over to the new interface. Most of the changes have resulted in some nice simplifications. This new strategy currently holds on to all AttributeList objects during the lifetime of the Parser object. This is easily tunable. If we desire to have more bound the lifetime of AttributeList objects more precisely, we can have the AttributeList::Factory object (in Parser) push/pop its underlying allocator as we enter/leave key methods in the Parser. This means that we get simple memory management while still having the ability to finely control memory use if necessary. Note that because AttributeList objects are now BumpPtrAllocated, we may reduce malloc() traffic in many large files with attributes. This fixes the leak reported in: <rdar://problem/8650003> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118675 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/AttributeList.cpp
|
c5127edaec77915a173708c2460fda030c67edc6 |
|
15-Oct-2010 |
Gabor Greif <ggreif@gmail.com> |
fix http://llvm.org/PR8371 in the straightforward way, also adding a comment git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116570 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/AttributeList.cpp
|
dd0cb22bd62e1e835327f478a2dbf0b8fa439713 |
|
29-Sep-2010 |
Daniel Dunbar <daniel@zuster.org> |
Add support for attribute((naked)), patch by Zoxc on cfe-commits! - Minor style tweaks by me. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115056 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/AttributeList.cpp
|
52fc314e1b5e1baee6305067cf831763d02bd243 |
|
03-Sep-2010 |
Dawn Perchik <dawn@burble.org> |
Add symantic support for the Pascal calling convention via "__attribute((pascal))" or "__pascal" (and "_pascal" under -fborland-extensions). Support still needs to be added to llvm. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112939 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/AttributeList.cpp
|
b3d8748e797c6c2f1dc01186c8eeb3b1b5fe970c |
|
24-Aug-2010 |
John McCall <rjmccall@apple.com> |
Abstract out passing around types and kill off ActionBase. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111901 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/AttributeList.cpp
|
19510856727e0e14a3696b2a72c35163bff2a71f |
|
20-Aug-2010 |
John McCall <rjmccall@apple.com> |
Another step in the process of making the parser depend on Sema: - 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
/external/clang/lib/Sema/AttributeList.cpp
|