Fariborz Jahanian
b6a68c0465
Minor rewriter cleanup and a test for a block rewriting bug.
...
llvm-svn: 96361
2010-02-16 17:26:03 +00:00
Fariborz Jahanian
e1ff123214
Fix rewriter bug when function call inside block with block parameter
...
causes C++ compile error (radar 7651312).
llvm-svn: 96352
2010-02-16 16:21:26 +00:00
Fariborz Jahanian
02d964babe
Fix a broken rewritin of @implementation keyword.
...
(fixes radar 7649577).
llvm-svn: 96270
2010-02-15 21:11:41 +00:00
Benjamin Kramer
88ab94e7a3
Pass StringRefs to InsertText/ReplaceText in RewriteObjC and remove a ton of unnecessary length arguments.
...
llvm-svn: 96164
2010-02-14 14:14:16 +00:00
Fariborz Jahanian
a459c4453d
Fixes a rewriter bug rewriting function decl.
...
with block-pointer-type as one or more of its
arguments. Fixes radar 7638400.
llvm-svn: 95992
2010-02-12 17:52:31 +00:00
Fariborz Jahanian
4c4ca5a9d3
Fixes a rewriting bug where order of constructor expression arguments did not match
...
order of constructor arguments (all block API specific). This was exposed only in
a large block literal expression in a large file where PtrSet container size
execceded its limit and required reallocation. Fixes radar 7638294
llvm-svn: 95936
2010-02-11 23:35:57 +00:00
Ted Kremenek
2c809308ca
Allocate the SubExprs array in ObjCMessageExpr using the allocator associated with ASTContext. This fixes yet another leak (<rdar://problem/7639260>).
...
llvm-svn: 95930
2010-02-11 22:41:21 +00:00
Douglas Gregor
d505812422
Eliminate a bunch of unnecessary ASTContexts from members functions of
...
Decl subclasses. No functionality change.
llvm-svn: 95841
2010-02-11 01:19:42 +00:00
Fariborz Jahanian
c3bdefa08d
Patch to rewrite blocks into unique api names.
...
Fixes radar 7630551
llvm-svn: 95796
2010-02-10 20:18:25 +00:00
Fariborz Jahanian
bbf4320390
Provide rewriting suppport for use of __typeof__
...
in a declaration statement. Fixes radar 7628153.
llvm-svn: 95788
2010-02-10 18:54:22 +00:00
Fariborz Jahanian
68ebe63865
Comment out category's property decls. in rewrite.
...
Fixes radar 7630636.
llvm-svn: 95744
2010-02-10 01:15:09 +00:00
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