Fariborz Jahanian
008ef72bee
Fixes an ObjC migrator crash when last decl
...
in file is an enum.
llvm-svn: 186700
2013-07-19 17:44:32 +00:00
Fariborz Jahanian
b0057bb4fc
ObjectiveC migrator: add support to migrate to
...
NS_OPTIONS.
llvm-svn: 186641
2013-07-19 01:05:49 +00:00
Fariborz Jahanian
85e988bbea
ObjectiveC migrator: Remove semicolon after the typedef
...
declaration when converting to NS_ENUM. This required
some code refactoring.
llvm-svn: 186619
2013-07-18 22:17:33 +00:00
Fariborz Jahanian
92463274e6
ObjectiveC migration. migration to NS_ENUM/SN_OPTION
...
- wip.
llvm-svn: 186604
2013-07-18 20:11:45 +00:00
Fariborz Jahanian
cb7b8deecb
ObjectiveC migrator: When adding conforming protocol,
...
only add outer-most conforming protocols as adding
others are redundant.
llvm-svn: 186473
2013-07-17 00:02:22 +00:00
Fariborz Jahanian
2bc3dda186
ObjectiveC migrator. If a class implements a protocol's
...
properties, then class conforms to that protocol.
llvm-svn: 186460
2013-07-16 21:59:42 +00:00
Fariborz Jahanian
5bd5affe2d
ObjC migrator: build conforming interface
...
declaration (not yet used). wip.
llvm-svn: 186369
2013-07-16 00:20:21 +00:00
Fariborz Jahanian
d36150d7ca
ObjC migrator: finding conforming protocol
...
candidates for each class. wip.
llvm-svn: 186349
2013-07-15 21:22:08 +00:00
Fariborz Jahanian
9a3512b11d
Fixes a typo caught by Arthur O'Dwyer
...
llvm-svn: 186249
2013-07-13 17:16:41 +00:00
Fariborz Jahanian
9eabf45fce
ObjC migrator: More knobs for migrating
...
conforming protocols to each class. wip.
llvm-svn: 186231
2013-07-13 00:04:20 +00:00
Fariborz Jahanian
1be015300c
ObjC migrator: early work for migrating implicitly conforming
...
protocols to classes. This is wip.
llvm-svn: 186220
2013-07-12 22:32:19 +00:00
Fariborz Jahanian
d83ef848bd
ObjC migrator: Add -objcmt-migrate-property to do property
...
migration. Also, fixes an old bug where older migration
flags were not being checked for properly.
llvm-svn: 185948
2013-07-09 16:59:14 +00:00
Fariborz Jahanian
7ac20e1031
ObjC migration: Skip over setter/getter with attributes
...
for now.
llvm-svn: 185879
2013-07-08 22:49:25 +00:00
Fariborz Jahanian
bfaabe40e7
[Objective-C migrator] replace candidate user setter/getter with
...
their equivalent property declaration. wip.
llvm-svn: 185873
2013-07-08 21:42:08 +00:00
Fariborz Jahanian
266926d85e
[objc migrator]: More knobs to do migration to
...
use of objc's properties.
llvm-svn: 185724
2013-07-05 20:46:03 +00:00
Fariborz Jahanian
43bbaaca80
[ObjectiveC migrator] relax the rules for setter/getter
...
types when deciding on validity of a property
inclusion. // rdar://14345082
llvm-svn: 185599
2013-07-04 00:24:32 +00:00
Fariborz Jahanian
de66100889
Minor refactoring of my last patch.
...
llvm-svn: 185593
2013-07-03 23:44:11 +00:00
Fariborz Jahanian
a7437f0227
[ObjectiveC Migration]: Provide knobs for
...
migrating setter/getter methods to an eventual
property declaraiton. This is wip.
// rdar://14345082
llvm-svn: 185591
2013-07-03 23:05:00 +00:00
Argyrios Kyrtzidis
6b4f341ecd
[objcmt] Rewrite a NSDictionary dictionaryWithObjects:forKeys: to a 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
2013-01-16 23:54:48 +00:00
Dmitri Gribenko
f857950d39
Remove useless 'llvm::' qualifier from names like StringRef and others that are
...
brought into 'clang' namespace by clang/Basic/LLVM.h
llvm-svn: 172323
2013-01-12 19:30:44 +00:00
Chandler Carruth
3a02247dc9
Sort all of Clang's files under 'lib', and fix up the broken headers
...
uncovered.
This required manually correcting all of the incorrect main-module
headers I could find, and running the new llvm/utils/sort_includes.py
script over the files.
I also manually added quite a few missing headers that were uncovered by
shuffling the order or moving headers up to be main-module-headers.
llvm-svn: 169237
2012-12-04 09:13:33 +00:00
Argyrios Kyrtzidis
f3d587ea7c
Refactor recording the preprocessor conditional directive regions out of
...
PreprocessingRecord and into its own class, PPConditionalDirectiveRecord.
Decoupling allows a client to use the functionality of PPConditionalDirectiveRecord
without needing a PreprocessingRecord.
llvm-svn: 169229
2012-12-04 07:27:05 +00:00
Ted Kremenek
cdf814900d
Split library clangRewrite into clangRewriteCore and clangRewriteFrontend.
...
This is similar to how we divide up the StaticAnalyzer libraries to separate
core functionality to what is clearly associated with Frontend actions.
llvm-svn: 163050
2012-09-01 05:09:24 +00:00
Benjamin Kramer
4ab984e74b
Drop the ASTContext.h include from DeclFriend.h and DeclTemplate.h.
...
llvm-svn: 159723
2012-07-04 20:19:54 +00:00
Argyrios Kyrtzidis
b482260748
[objcmt] Warn when modern objc migrator does not convert a NSNumber message because it requires a cast.
...
rdar://11525138
llvm-svn: 157395
2012-05-24 16:48:23 +00:00
David Blaikie
bbafb8a745
Unify naming of LangOptions variable/get function across the Clang stack (Lex to AST).
...
The member variable is always "LangOpts" and the member function is always "getLangOpts".
Reviewed by Chris Lattner
llvm-svn: 152536
2012-03-11 07:00:24 +00:00
Ted Kremenek
f7639e1b4a
Add new code migrator support for migrating existing Objective-C code to use
...
the new Objective-C NSArray/NSDictionary/NSNumber literal syntax.
This introduces a new library, libEdit, which provides a new way to support
migration of code that improves on the original ARC migrator. We now believe
that most of its functionality can be refactored into the existing libraries,
and thus this new library may shortly disappear.
llvm-svn: 152141
2012-03-06 20:06:33 +00:00