Commit Graph

101 Commits

Author SHA1 Message Date
Fariborz Jahanian e6a4e3933d Initialize block's imported variable(s) in
block's synthesized constructor initalizer list.
Fixes radar 8240371.

llvm-svn: 109698
2010-07-28 23:27:30 +00:00
Fariborz Jahanian 34c85987fe Fix a rewriter bug which originates in SemaInit involving
Constructor Initialization which computes Source Location
differently now. Fixes radar 8213998.

llvm-svn: 109018
2010-07-21 17:36:39 +00:00
Chris Lattner 33919e7450 fix PR7280 by making the warning on code like this:
int test1() {
  return;
}

default to an error.

llvm-svn: 108108
2010-07-11 23:34:02 +00:00
Daniel Dunbar 8ab6c54ce2 Rewriter: Use the appropriate printing context instead of the default
constructed one -- this is necessary to ensure types get printed correctly.

llvm-svn: 107312
2010-06-30 19:16:53 +00:00
Fariborz Jahanian e33c116bdf Nasty rewriter bug which turns out to have an easy fix in
rewriting a c-style cast expression in statement printer.
Fixes radar 8143056.

llvm-svn: 107289
2010-06-30 16:31:08 +00:00
Fariborz Jahanian 19c6240713 Patch to rewrite block pointers as arguments to
methods. (Radar 7987817).

llvm-svn: 104608
2010-05-25 15:56:08 +00:00
Fariborz Jahanian 36680dd751 Fix a rewriting bug where a local static objective-c
pointer is copied into a block. Fixes radar 7924024.

llvm-svn: 104526
2010-05-24 18:32:56 +00:00
Fariborz Jahanian 427ee8b5f3 Fix an objective-c rewriter bug when pre-processed file's
class declaration's @end is not followed by a new-line.
(radar 7946975).

llvm-svn: 104512
2010-05-24 17:22:38 +00:00
Chris Lattner 8d269dc329 make the rewriter add a #ifndef around the #define of __attribute__.
Without it, there is no reason for a compiler that supports it to
emit the dead static globals that the rewriter labels attribute(used).

llvm-svn: 101149
2010-04-13 17:33:56 +00:00
Chris Lattner 198cb4df6e Instead of counting totally diagnostics, split the count into a count
of errors and warnings.  This allows us to emit something like this:

2 warnings and 1 error generated.

instead of:

3 diagnostics generated.

This also stops counting 'notes' because they are just follow-on information
about the previous diag, not a diagnostic in themselves.

llvm-svn: 100675
2010-04-07 18:47:42 +00:00
Fariborz Jahanian 3a106e7029 Add tentative support for accessing local variables with
external linkage (static, extern, etc.) in blocks in
rewriter. wip.

llvm-svn: 98265
2010-03-11 18:20:03 +00:00
Fariborz Jahanian a4a925febb Change the 'super' messaging API in the rewriter.
Fixes radar 7738452.

llvm-svn: 98190
2010-03-10 21:17:41 +00:00
Fariborz Jahanian 97bb418575 Make rewritten source compiled with clang++.
llvm-svn: 97762
2010-03-04 23:13:29 +00:00
Fariborz Jahanian 7103835d79 Make rewritten source compiled with clang++ for correctness.
llvm-svn: 97761
2010-03-04 23:03:49 +00:00
Fariborz Jahanian 3db51d80ec Change test to compile rewritten test with clang++.
llvm-svn: 97756
2010-03-04 21:57:21 +00:00
Fariborz Jahanian 8bb35c4d7c Fixes a bug whereby static const block var has static
moved incorrectly. (radar 7714443).

llvm-svn: 97734
2010-03-04 18:54:29 +00:00
Fariborz Jahanian f4609d431f More rewriter of nested blocks fun stuff.
Radar 7696893.

llvm-svn: 97520
2010-03-01 23:36:21 +00:00
Fariborz Jahanian 6005bd821c Prevent rewriter crash when variable type is missing.
Fixes radar 7692183.

llvm-svn: 97281
2010-02-26 22:49:11 +00:00
Fariborz Jahanian ce2ea59d2c Fix rewriting of byref variables in nested blocks.
Fixes radar 7692350.

llvm-svn: 97254
2010-02-26 19:55:31 +00:00
Fariborz Jahanian 5743d4d280 Rewriting of imported variable from outer
blocks's argument in the inner block requires special treatment.
Fixes radar 7692419.

llvm-svn: 97244
2010-02-26 19:05:20 +00:00
Fariborz Jahanian ec201dc3c6 Support rewriting of property synthesis with retain/copy
attributes. Fixes radar 7214439.

llvm-svn: 97203
2010-02-26 01:42:20 +00:00
Fariborz Jahanian 1f7fe2c7f7 Added test case for non-objective-c situation in
my last patch.

llvm-svn: 97075
2010-02-24 22:53:58 +00:00
Fariborz Jahanian 8652be05b7 Implement nasty rewriting of nested blocks when inner
blocks use variables not used in any of the outer blocks.
(Fixes radar 7682149).

llvm-svn: 97073
2010-02-24 22:48:18 +00:00
Fariborz Jahanian bcb175b230 Correct radar no.
llvm-svn: 97009
2010-02-24 01:37:04 +00:00
Fariborz Jahanian f89eb2b9c2 Fix rewriting of a method when return type is
a block pointer type. Fixes radar 7682149.

llvm-svn: 97008
2010-02-24 01:25:40 +00:00
Fariborz Jahanian c1b7acbaeb Fixes a rewriting of qualified-id type which exposed a bigger
rewriting problem. Fixes radar 7680953.

llvm-svn: 96987
2010-02-23 21:34:38 +00:00
Fariborz Jahanian b8f018d1e9 Fixes a rewriting of byref variable when its initializer is
itself rewritten. Radar 7669784.

llvm-svn: 96798
2010-02-22 20:48:10 +00:00
Ted Kremenek 1979007ca8 Don't emit a warning about a dllimport attribute being used in a typedef
when -fms-extensions is specified.  Fixes <rdar://problem/7653870>.

llvm-svn: 96722
2010-02-21 05:12:56 +00:00
Ted Kremenek a3cfc4d1e1 Don't warn about functions redeclared without the dllimport attribute when
-fms-extensions is enabled.  Fixes <rdar://problem/7669559>.

llvm-svn: 96721
2010-02-21 05:12:53 +00:00
Fariborz Jahanian f50679151b __typeof should be able to handle block pointer types when
rewriting. Fixes radar 7659483.

llvm-svn: 96549
2010-02-18 01:20:22 +00:00
Fariborz Jahanian cf01cbef16 More rewriter test converted to compile with clang.
llvm-svn: 96406
2010-02-16 22:27:50 +00:00
Fariborz Jahanian be1896e944 With addition of -Wno-address-of-temporary (thank you Doug) we can now
have rewriter test cases which pass the .cpp file through clang
and also test c++ aspect of clang.

llvm-svn: 96405
2010-02-16 22:13:48 +00:00
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 06708cee8d Test to compile the rewritten file for my last patch.
(radar 7649577 related).

llvm-svn: 96274
2010-02-15 21:37:11 +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 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
Fariborz Jahanian 73587761e2 Removed non-essential header file from test.
llvm-svn: 95396
2010-02-05 18:04:36 +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 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 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 734e95e05c Enhance test to check on expected rewritten output.
llvm-svn: 94368
2010-01-24 18:40:06 +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