Ted Kremenek
31e7f0f293
Add guard in RewriteObjC::HandleTopLevelSingleDecl() to not do
...
anything when Sema has issued an error. This matches the behavior in
RewriteObjC::HandleTranslationUnit().
llvm-svn: 95434
2010-02-05 21:28:51 +00:00
Fariborz Jahanian
314333847e
Fixes a minor rewriter bug messaging inside a function call.
...
Fixes radar 7617047.
llvm-svn: 95392
2010-02-05 17:48:10 +00:00
Fariborz Jahanian
a7e1dcdc0e
Some clean up of replacement text API no longer needed by
...
my recent changes.
llvm-svn: 95391
2010-02-05 16:43:40 +00:00
Fariborz Jahanian
80fadb5069
Fix a nested ivar reference rewriting bug.
...
(Fixes radar 7607605).
llvm-svn: 95341
2010-02-05 01:35:00 +00:00
Fariborz Jahanian
b8355e3b9f
Fix rewriting of 'const' __block variables in
...
the rewriter. (Fixes radar 7607781).
llvm-svn: 95267
2010-02-04 00:07:58 +00:00
Fariborz Jahanian
80c54b05a0
Fix more rewriting of protocol-quialified 'id' type.
...
(Fixes radar 7607413).
llvm-svn: 95257
2010-02-03 21:29:28 +00:00
Fariborz Jahanian
06769f9197
Fix up rewriting of protocol qualified types in objc rewriter.
...
Fixes radar 7589414.
llvm-svn: 95097
2010-02-02 18:35:07 +00:00
Fariborz Jahanian
b5f99c3f4f
Fixes rewriter bug rewriting byref related API where a struct
...
definition comes after where it is needed. Fixes radar 7589385.
llvm-svn: 94788
2010-01-29 01:55:49 +00:00
Fariborz Jahanian
81310810bd
Fixes a rewrite bug rewriting nested ivars reference.
...
(Radar 7583971).
llvm-svn: 94724
2010-01-28 01:41:20 +00:00
Fariborz Jahanian
f0ed69cb5b
Added assert to the rewrite.
...
llvm-svn: 94584
2010-01-26 20:37:44 +00:00
Fariborz Jahanian
f9e8c2b759
Refix rewriting of an ivar access when it is
...
type-cast to its sub-class (radar 7575882).
llvm-svn: 94559
2010-01-26 18:28:51 +00:00
Fariborz Jahanian
7b99f27392
Fix a regression caused by my rewriting of cast of ivar
...
access (was radar 7575882).
llvm-svn: 94481
2010-01-26 00:29:22 +00:00
Fariborz Jahanian
d360ce9d57
Fixes a rewriting bug of access ivar of a variable cast
...
to subclass. (Fixes radar 7575882).
llvm-svn: 94444
2010-01-25 20:50:02 +00:00
Fariborz Jahanian
da8ec2bc9e
Patch to implement rewriting of properties.
...
Fixes radar 7562952.
llvm-svn: 94087
2010-01-21 17:36:00 +00:00
Mike Stump
281d6d7745
Use the llvm coding convention for indentation for switch.
...
llvm-svn: 93966
2010-01-20 02:03:14 +00:00
John McCall
5d7aa7fa0a
The type of a compound literal expression is not necessarily the same as the
...
type which was syntactically written. Fixes PR 6080.
llvm-svn: 93933
2010-01-19 22:33:45 +00:00
Fariborz Jahanian
f3b9b9583e
Rewriteing of gnu extension __typeof in objective-c rewriter.
...
Fixes radar 6358225.
llvm-svn: 93917
2010-01-19 21:48:35 +00:00
John McCall
e15bbff98d
Preserve type source information in compound literal expressions.
...
Patch by Enea Zaffanella!
llvm-svn: 93752
2010-01-18 19:35:47 +00:00
Fariborz Jahanian
faf85c0dbe
Fix a rewriting crash and correct rewriting of __block
...
declaration where its initializer has a type-cast.
llvm-svn: 93650
2010-01-16 19:36:43 +00:00
Fariborz Jahanian
f0462ff691
define __weak to null in rewritten source for
...
-fms-extensions as well.
llvm-svn: 93569
2010-01-15 22:29:39 +00:00
John McCall
9751396d70
Preserve type source information in explicit cast expressions.
...
Patch by Enea Zaffanella.
llvm-svn: 93522
2010-01-15 18:39:57 +00:00
Fariborz Jahanian
5c26eeefdd
Do not do the block-specific rewrite when there is no block literals.
...
Fixes radar 7546096.
llvm-svn: 93519
2010-01-15 18:14:52 +00:00
Fariborz Jahanian
195ac2dfab
Patch to avoid duplicate declaration of byref structs
...
for __block variables of same name declared in multiple scopes.
Fixes radar 7540194
llvm-svn: 93474
2010-01-14 23:05:52 +00:00
Fariborz Jahanian
e2dd5428e6
Fix a bug in rewrite whereby functions using blocks put extern "C" in wrong place.
...
Fixes radar 7284618.
llvm-svn: 93382
2010-01-14 00:35:56 +00:00
Fariborz Jahanian
12e2e86f0f
Improve on objective-c pointer recognition
...
during rewrite. No functionality chang.
llvm-svn: 93241
2010-01-12 17:31:23 +00:00
Fariborz Jahanian
5951609ac2
Fix rewriting of MacOS sjlj based eh.
...
Fixes radar 7522880.
llvm-svn: 93219
2010-01-12 01:22:23 +00:00
Fariborz Jahanian
1c2cb6df9e
Fix rewriting for forward class declaration.
...
(fixes radar 6969189).
llvm-svn: 93201
2010-01-11 22:48:40 +00:00
Fariborz Jahanian
9146e44124
Fixup rewrite of ivars accessed via an explicit object
...
in a function. Fixes radar 7522803.
llvm-svn: 93159
2010-01-11 17:50:35 +00:00
Benjamin Kramer
e056cea3a6
Silence MSVC warning.
...
RewriteObjC.cpp(4419) : warning C4804: '>' : unsafe use of type 'bool' in operation
llvm-svn: 93124
2010-01-10 19:57:50 +00:00
Chris Lattner
b71980f888
revert 91891, a workaround for PR5514.
...
llvm-svn: 93077
2010-01-09 21:45:57 +00:00
Fariborz Jahanian
39d70940e4
clang ObjC rewriter: generated code used in "for (x in y)" loop uses
...
incorrect cast, causing compile error (fixes radar 7342867).
llvm-svn: 92986
2010-01-08 01:29:44 +00:00
Fariborz Jahanian
bc6811c32e
Fixes a bug where we were rewriting two definitions of
...
_objc_method (part of radar 7490408).
llvm-svn: 92957
2010-01-07 22:51:18 +00:00
Fariborz Jahanian
1444230c40
Fixes a bug in my last patch (related to radar 7490331).
...
llvm-svn: 92952
2010-01-07 22:15:31 +00:00
Fariborz Jahanian
9ab6349f2a
Avoid error when convering a pointer to integer in
...
rewriting.
llvm-svn: 92925
2010-01-07 18:31:42 +00:00
Fariborz Jahanian
0f3aecf272
Fix rewriting of ivars. Fixes radar 7490331.
...
llvm-svn: 92924
2010-01-07 18:18:32 +00:00
Ted Kremenek
db2ef3732f
Fix typo: rename Rewriter::getRewritenText() -> Rewriter::getRewrittenText().
...
llvm-svn: 92922
2010-01-07 18:00:35 +00:00
Ted Kremenek
c7c6431860
Change ObjCContainerDecl to contain the entire range for the '@end'
...
piece of the declaration. The '@' and the 'end' are separate tokens,
and require two SourceLocations to accurately track.
This change was motivated because ObjCContainerDecl::getSourceRange()
would previously not return the entire range of the declaration (the
'end' would be left off).
llvm-svn: 92891
2010-01-07 01:20:12 +00:00
Fariborz Jahanian
b8646edecd
Fixed a bug where initializer is a macro in rewrite.
...
llvm-svn: 92801
2010-01-05 23:06:29 +00:00
Fariborz Jahanian
7fac65572f
API support for __block variables which are also __weak.
...
llvm-svn: 92755
2010-01-05 19:21:35 +00:00
Fariborz Jahanian
f794543472
Minor clean up.
...
llvm-svn: 92746
2010-01-05 18:15:57 +00:00
Steve Naroff
7bf01ea165
Remove bogus "C" from preamble block decls.
...
llvm-svn: 92744
2010-01-05 18:09:31 +00:00
Fariborz Jahanian
e389158dbf
More rewriting of __block APIs. wip.
...
llvm-svn: 92742
2010-01-05 18:04:40 +00:00
Fariborz Jahanian
8c07e75a61
More rewriting of __block objective-c pointer variables. wip.
...
llvm-svn: 92558
2010-01-05 01:16:51 +00:00
Fariborz Jahanian
d6cba5065f
More rewriting of __block declared objective-c/block pointers.
...
This is wip.
llvm-svn: 92501
2010-01-04 19:50:07 +00:00
Fariborz Jahanian
92368a15f9
When rewriting a __block declaration, use a suitable API to get location of
...
the declaration in the presence of an initializer macro.
llvm-svn: 92312
2009-12-30 20:38:08 +00:00
Fariborz Jahanian
65e6bd6246
More cleanup/refactoring of the rewrite.
...
llvm-svn: 92062
2009-12-23 21:52:32 +00:00
Fariborz Jahanian
4bf727d9e1
Some cleanup and refactoring of rewriter.
...
llvm-svn: 92049
2009-12-23 21:18:41 +00:00
Fariborz Jahanian
cbdcfe802a
This patch concludes rewriteing of __block variables to allow
...
a small test case using Block_copy(...) API to pass.
llvm-svn: 92038
2009-12-23 20:32:38 +00:00
Fariborz Jahanian
25c07fa224
Removed a FIXME comment.
...
llvm-svn: 92028
2009-12-23 19:26:34 +00:00
Fariborz Jahanian
7df3980609
More rewriting of __block variables.
...
llvm-svn: 92027
2009-12-23 19:22:33 +00:00