summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/NSAPI.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [OpenCL] Add new types for OpenCL 2.0.Alexey Bader2015-09-151-0/+10
| | | | | | | | Patch by Pedro Ferreira. Reviewers: pekka.jaaskelainen Differential Revision: http://reviews.llvm.org/D12855 llvm-svn: 247676
* [OPENMP 4.0] Initial support for array sections.Alexey Bataev2015-08-251-0/+1
| | | | | | | | Adds parsing/sema analysis/serialization/deserialization for array sections in OpenMP constructs (introduced in OpenMP 4.0). Currently it is allowed to use array sections only in OpenMP clauses that accepts list of expressions. Differential Revision: http://reviews.llvm.org/D10732 llvm-svn: 245937
* [ObjC] Circular containers: add support of subclassesAlex Denisov2015-08-061-1/+21
| | | | llvm-svn: 244193
* [ObjC] Add NSValue support for objc_boxed_expressionsAlex Denisov2015-06-261-1/+2
| | | | | | | | | | | | | Patch extends ObjCBoxedExpr to accept records (structs and unions): typedef struct __attribute__((objc_boxable)) _Color { int r, g, b; } Color; Color color; NSValue *boxedColor = @(color); // [NSValue valueWithBytes:&color objCType:@encode(Color)]; llvm-svn: 240761
* [modules] Stop trying to fake up a linear MacroDirective history.Richard Smith2015-04-291-0/+5
| | | | | | | | | | | | | | Modules builds fundamentally have a non-linear macro history. In the interest of better source fidelity, represent the macro definition information faithfully: we have a linear macro directive history within each module, and at any point we have a unique "latest" local macro directive and a collection of visible imported directives. This also removes the attendent complexity of attempting to create a correct MacroDirective history (which we got wrong in the general case). No functionality change intended. llvm-svn: 236176
* New ObjC warning: circular containers.Alex Denisov2015-03-041-1/+96
| | | | | | | | | | | | | | | | | | | | | This commit adds new warning to prevent user from creating 'circular containers'. Mutable collections from NSFoundation allows user to add collection to itself, e.g.: NSMutableArray *a = [NSMutableArray new]; [a addObject:a]; The code above leads to really weird behaviour (crashes, 'endless' recursion) and retain cycles (collection retains itself) if ARC enabled. Patch checks the following collections: - NSMutableArray, - NSMutableDictionary, - NSMutableSet, - NSMutableOrderedSet, - NSCountedSet. llvm-svn: 231265
* Objective-C. revert patch for rdar://17554063.Fariborz Jahanian2014-10-281-17/+0
| | | | llvm-svn: 220812
* Objective-C SDK modernizer. Patch to support modernizationFariborz Jahanian2014-10-061-0/+27
| | | | | | | | to NS_ENUM/NS_OPTION macros when typedef names are other than NSInteger/NSUInteger (int8_t, etc.). rdar://18532199 llvm-svn: 219173
* Objective-C modernization. Convert -initWithUTF8String messagingFariborz Jahanian2014-08-251-0/+4
| | | | | | with auto-boxing syntax for literals. rdar://18080352 llvm-svn: 216405
* Objective-C ARC. Adding declarations for Objective-C'sFariborz Jahanian2014-08-061-0/+17
| | | | | | new APIs for literals. nfc. wip. rdar://17554063 llvm-svn: 214993
* [C++11] Use 'nullptr'. AST edition.Craig Topper2014-05-121-3/+3
| | | | llvm-svn: 208517
* Use None rather than Optional<T>() where possible.David Blaikie2013-02-211-6/+6
| | | | llvm-svn: 175705
* Include llvm::Optional in clang/Basic/LLVM.hDavid Blaikie2013-02-201-12/+11
| | | | | | Post-commit CR feedback from Jordan Rose regarding r175594. llvm-svn: 175679
* Add OpenCL samplers as Clang builtin types and check sampler related ↵Guy Benyei2013-02-071-0/+1
| | | | | | restrictions. llvm-svn: 174601
* Implement OpenCL event_t as Clang builtin type, including event_t related ↵Guy Benyei2013-01-201-0/+1
| | | | | | OpenCL restrictions (OpenCL 1.2 spec 6.9) llvm-svn: 172973
* [objcmt] Rewrite a NSDictionary dictionaryWithObjects:forKeys: to a ↵Argyrios Kyrtzidis2013-01-161-0/+8
| | | | | | | | | | | | | | | | | | dictionary literal if we can see the elements of the arrays. for example: NSDictionary *dict = [NSDictionary dictionaryWithObjects:[NSArray arrayWithObjects:@"1", @"2", nil] forKeys:[NSArray arrayWithObjects:@"A", @"B", nil]]; --> NSDictionary *dict = @{ @"A" : @"1", @"B" : @"2" }; rdar://12428166 llvm-svn: 172679
* Re-commit r170428 changes with Linux style file endings.Guy Benyei2012-12-181-0/+6
| | | | | | Add OpenCL images as clang builtin types. llvm-svn: 170432
* Revert changes from r170428, as I accidentally changed the line endings of ↵Guy Benyei2012-12-181-420/+414
| | | | | | these files to Windows style. llvm-svn: 170431
* Add OpenCL images as clang builtin types.Guy Benyei2012-12-181-414/+420
| | | | llvm-svn: 170428
* Change the representation of builtin functions in the ASTEli Friedman2012-08-311-0/+1
| | | | | | | | | (__builtin_* etc.) so that it isn't possible to take their address. Specifically, introduce a new type to represent a reference to a builtin function, and a new cast kind to convert it to a function pointer in the operand of a call. Fixes PR13195. llvm-svn: 162962
* [objcmt] Don't migrate to subscripting syntax if the required methods have notArgyrios Kyrtzidis2012-06-041-0/+12
| | | | | | | | been declared on NSArray/NSDictionary. rdar://11581975 llvm-svn: 157951
* [objcmt] Rewrite messages to NSString's stringWithUTF8String:/stringWithCString:Argyrios Kyrtzidis2012-05-151-1/+47
| | | | | | | | | | | to use the @() boxing syntax. It will also rewrite uses of stringWithCString:encoding: where the encoding that is used is NSASCIIStringEncoding or NSUTF8StringEncoding. rdar://11438360 llvm-svn: 156868
* [objc] When boxing a BOOL/NSInteger/NSUInteger type, use the correspondingArgyrios Kyrtzidis2012-05-101-3/+46
| | | | | | | | numberWithBool:/numberWithInteger:/numberWithUnsignedInteger: NSNumber selectors. rdar://11428703 llvm-svn: 156583
* Added a new attribute, objc_root_class, which informs the compiler when a ↵Patrick Beard2012-04-061-0/+1
| | | | | | | | | root class is intentionally declared. The warning this inhibits, -Wobjc-root-class, is opt-in for now. However, all clang unit tests that would trigger the warning have been updated to use -Wno-objc-root-class. <rdar://problem/7446698> llvm-svn: 154187
* Add clang support for new Objective-C literal syntax for NSDictionary, NSArray,Ted Kremenek2012-03-061-0/+311
NSNumber, and boolean literals. This includes both Sema and Codegen support. Included is also support for new Objective-C container subscripting. My apologies for the large patch. It was very difficult to break apart. The patch introduces changes to the driver as well to cause clang to link in additional runtime support when needed to support the new language features. Docs are forthcoming to document the implementation and behavior of these features. llvm-svn: 152137
OpenPOWER on IntegriCloud