Fariborz Jahanian
042b91d539
modern objc translation: Add translation of @autoreleasepool
...
statement. // rdar://11474836.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157359 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-23 23:47:20 +00:00
Argyrios Kyrtzidis
2df1a5819f
[objc] When boxing a BOOL/NSInteger/NSUInteger type, use the corresponding
...
numberWithBool:/numberWithInteger:/numberWithUnsignedInteger: NSNumber selectors.
rdar://11428703
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156583 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-10 23:12:03 +00:00
Fariborz Jahanian
4abe3d3700
Test for previously checked in patch.
...
// rdar://11374235
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156552 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-10 17:05:15 +00:00
Fariborz Jahanian
ec5a7fc1ac
Remove this test again which fails the build-bot for reasons yet
...
unknown to me.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156480 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-09 17:18:19 +00:00
Fariborz Jahanian
4c4cc16dbb
Re-add test for // rdar://11374235
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156477 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-09 16:15:46 +00:00
Fariborz Jahanian
767e9d9a9d
Remove thid test for now.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156455 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-09 00:27:52 +00:00
Fariborz Jahanian
163d3cef33
Modern objective-c translation. Translating default
...
synthesis of property getter/setters. // rdar://11374235
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156447 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-08 23:54:35 +00:00
Fariborz Jahanian
20e181a3ec
modern objc translation. objc_getClass() and objc_getMetaClass()
...
prototypes should both return `struct objc_class *`.
// rdar://11375495
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156418 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-08 20:55:55 +00:00
Douglas Gregor
fcf7f9fdcb
Revert r156097, which appears to be causing some breakage.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156304 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-07 14:17:47 +00:00
Fariborz Jahanian
ebfa272051
objc modern translator: fix up attribute for dynamic property in a category.
...
// rdar://11095151
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156127 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-03 23:19:33 +00:00
Fariborz Jahanian
301e2e40f9
modern objc translator: support for default property
...
synthesis translation. // rdar://11374235 - wip.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156125 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-03 22:52:13 +00:00
Fariborz Jahanian
8b08adb279
modern objc translator: used size_t in couple
...
of places. // rdar://11375908
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156106 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-03 21:44:12 +00:00
Fariborz Jahanian
502261a673
modern objc translation. objc_getClass() and objc_getMetaClass()
...
prototypes should both return `struct objc_class *`.
// rdar://11375495
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156097 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-03 20:23:37 +00:00
Fariborz Jahanian
f5eac481ab
Modern objective-c translation: Fixing couple of bugs
...
related to laying out ivar structs and accessing non-fragile-ivar
in more compilated cases. // rdar://11323187
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156004 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-02 17:34:59 +00:00
Fariborz Jahanian
b68258fba6
modern objective-c translation of private ivars.
...
// rdar://11351299
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155921 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-01 17:46:45 +00:00
NAKAMURA Takumi
9ff009faec
clang/test/Rewriter: Remove XFAIL and add -U__declspec to other 9 tests. mingw32 tends to define built-in __declspec.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155911 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-01 10:52:06 +00:00
NAKAMURA Takumi
bb1a899dd5
clang/test/Rewriter/rewrite-modern-extern-c-func-decl.mm: Remove XFAIL and add -U__declspec. mingw32 tends to define built-in __declspec.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155910 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-01 10:51:55 +00:00
Fariborz Jahanian
8fba894335
modern objective-c translator. named aggregate types
...
defined inside the objc class belong to class's
decl. scope. This is to conform to objective-c
rules. // rdar://11351299
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155855 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-30 23:20:30 +00:00
Fariborz Jahanian
27fc81b580
objective-c modern translator: Correctly translate
...
nonfragile ivar access code when ivar type is a
locally defined struct/union type. // rdar://11323187
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155740 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-27 22:48:54 +00:00
NAKAMURA Takumi
29a4ce4e72
test/Rewriter: Mark 4 tests as XFAIL:mingw32, due to predefined __declspec(a) issue.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155692 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-27 04:36:34 +00:00
Fariborz Jahanian
65a7c685b7
modern objective-c transltion: Fixes a translation bug
...
of writing a __block variable being initialized with
a constructed object. // rdar://11326988
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155673 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-26 23:20:25 +00:00
Fariborz Jahanian
df407c337c
objective-c modern translator: more tests.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155585 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-25 20:48:00 +00:00
Fariborz Jahanian
d3a39f0a42
improve a modern objc translator test.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155569 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-25 18:11:57 +00:00
Fariborz Jahanian
041895354a
modern objc rewriter: fixes a bug writing
...
a const qualified static c-function.
// rdar://11314329
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155564 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-25 17:56:48 +00:00
Fariborz Jahanian
4fe261cb0a
modern objc translator: Allow writing of multiple
...
declaration of __block variables on same lines
with initializers. // rdsr://7547630
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155473 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-24 19:38:45 +00:00
Fariborz Jahanian
e6e96de44f
objc modern rewriter: allow translation of
...
multiple declaration of block variables
(with no initializer) on the same line.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155462 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-24 18:16:20 +00:00
NAKAMURA Takumi
88442c935d
clang/test/Rewriter/objc-modern-boxing.mm: Mark as XFAIL:mingw for now, due to predefined __declspec similar to r155278.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155417 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-24 01:19:04 +00:00
NAKAMURA Takumi
126d3d0905
clang/test/Rewriter/rewrite-modern-extern-c-func-decl.mm: Mark as XFAIL:mingw for now, due to predefined __declspec.
...
It could be tweaked to add -triple i686-win32, though.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155278 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-21 09:39:58 +00:00
Fariborz Jahanian
89592d5046
minor improvement to couple of tests.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155204 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-20 17:07:07 +00:00
Fariborz Jahanian
b5863da6ef
objective-c modern translator: Further improving the last
...
patch fixing writing a spurious 'static' into
the wrong place. // rdar://11275241
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155130 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-19 16:30:28 +00:00
Fariborz Jahanian
b75f8de7dd
modern objective-c translator: Fix writing a spurious 'static'
...
into the wrong place when rewriting a static function
which declares block literals. // rdar://11275241
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155084 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-19 00:50:01 +00:00
Patrick Beard
eb382ec150
Implements boxed expressions for Objective-C. <rdar://problem/10194391>
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155082 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-19 00:25:12 +00:00
Fariborz Jahanian
76a98bef86
objective-c modern translation. Correct rewriting of
...
block meta-data of block literals declared inside
of extern "C" functions.
// rdar://1131490
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154939 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-17 18:40:53 +00:00
Fariborz Jahanian
0e976818ea
Modern objective-c translator:'self' used inside
...
block literal is imported. // rdar://11259664
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154876 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-16 23:00:57 +00:00
Fariborz Jahanian
43aa1c302b
modern objective-c translator: translation of implicit
...
cast to/from block pointer types. // rdar://11202764
Also, many more modern translator tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154869 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-16 22:14:01 +00:00
Fariborz Jahanian
93a49944e0
objective-c modern translator: buildit objc bool
...
type for rewriter project will be BoolTy.
// rdar://11231426.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154861 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-16 21:03:30 +00:00
Fariborz Jahanian
8590d86ea3
objective-c modern translator: Make metadata
...
definition for protocols static. // rdar://11248048
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154753 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-14 17:13:08 +00:00
Fariborz Jahanian
653b7cff0e
modern objective-c translator: Fixes translation of
...
__typeof which is a regression by reverting
r154360. // rdar://11233924
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154679 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-13 18:00:54 +00:00
Fariborz Jahanian
b20c46ea98
modern objective-c translator: When translating
...
call to 'super' use __rw_objc_super as type of the
'super' meta-data instead of objc_super.
// rdar://11239894
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154670 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-13 16:20:05 +00:00
Fariborz Jahanian
9985038860
objective-c numeric literal: type of boolean is
...
that of typedef BOOL if found.
// rdar://11231426
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154595 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-12 17:49:18 +00:00
Fariborz Jahanian
5ce2827de3
modern objective-c translator. ifdef'out
...
__weak and __block when rewriting.
// rdar://11236342
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154592 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-12 16:33:31 +00:00
Fariborz Jahanian
104dbf9825
modern objective-c translator. Fixes a mis-translation when
...
of a __block struct object. // rdar://11230308
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154566 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-11 23:57:12 +00:00
Fariborz Jahanian
acee1c9dbe
modern objective-c translator. Fixes a translation bug when
...
first ivar in the list is a bitfield.
// rdar://11229770
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154534 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-11 21:12:36 +00:00
Fariborz Jahanian
88ec610081
modern objective-c translation: writing container
...
subscripting. // rdar://11203853
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154441 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-10 22:06:54 +00:00
Fariborz Jahanian
f1ee68710a
objective-c modern translator: rewriting specific
...
implicit casts which is needed to produce good c++
code. // rdar://11202764
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154360 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-10 00:08:18 +00:00
Fariborz Jahanian
f7ef931a15
more testing of objc's dictionary literal translation.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154220 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-06 22:51:48 +00:00
Fariborz Jahanian
e35abe1fd3
modern objective-c translation: support for
...
dictionary literals. This concludes // rdar://10803676
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154218 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-06 22:29:36 +00:00
Fariborz Jahanian
b0f245ccce
modern objective-c translator: translate array literal
...
expressions. // rdar://10803676
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154196 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-06 19:47:36 +00:00
Fariborz Jahanian
b3f904f79b
modern objective-c translator: rewriter linkage spec.
...
// rdar://11169733
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153960 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-03 17:35:38 +00:00
Fariborz Jahanian
0f9b18ed04
modern objective-c translator: writing numeric
...
literals. // rdar://10803676
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153756 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-30 16:49:36 +00:00