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
Steve Naroff
13468371a7
Add support for handling initializers in RewriteObjC::RewriteByRefVar().
...
As the FIXME indicates, RewriteByRefVar() won't work for multiple declarators (in general). I've discussed this with Fariborz and he is aware of the limitation.
llvm-svn: 92007
2009-12-23 17:24:33 +00:00
Fariborz Jahanian
02e07737a9
Patch to do more rewrite of __block variables.
...
Still WIP.
llvm-svn: 91977
2009-12-23 02:07:37 +00:00
Anders Carlsson
3caa2b486d
Work around PR5514.
...
llvm-svn: 91891
2009-12-22 06:13:42 +00:00
Fariborz Jahanian
8120346c57
Template code for rewrite of __block variables - wip.
...
llvm-svn: 91865
2009-12-22 00:48:54 +00:00
Fariborz Jahanian
e175eeb117
Providing support for rewriting of block copy/dispose of
...
imported block variables. WIP.
llvm-svn: 91856
2009-12-21 23:31:42 +00:00
Fariborz Jahanian
6ab7ed40c7
Implemented rewriting of invocation of a block ivar.
...
(radar 7482224).
llvm-svn: 91652
2009-12-18 01:15:21 +00:00
Fariborz Jahanian
d1a2d5719a
Implement conditional block invocation rewrite
...
and some clean up and a block rewriter test.
llvm-svn: 91435
2009-12-15 17:30:20 +00:00
John McCall
bcd035061d
DeclaratorInfo -> TypeSourceInfo. Makes an effort to rename associated variables,
...
but the results are imperfect.
For posterity, I did:
cat <<EOF > $cmdfile
s/DeclaratorInfo/TypeSourceInfo/g
s/DInfo/TInfo/g
s/TypeTypeSourceInfo/TypeSourceInfo/g
s/SourceTypeSourceInfo/TypeSourceInfo/g
EOF
find lib -name '*.cpp' -not -path 'lib/Parse/*' -exec sed -i '' -f $cmdfile '{}' \;
find lib -name '*.h' -exec sed -i '' -f $cmdfile '{}' \;
find include -name '*.h' -not -path 'include/clang/Parse/*' -not -path 'include/clang/Basic/*' -exec sed -i '' -f $cmdfile '{}' \;
llvm-svn: 90743
2009-12-07 02:54:59 +00:00
Steve Naroff
30484700c5
Integrate the following from the 'objective-rewrite' branch:
...
http://llvm.org/viewvc/llvm-project?view=rev&revision=81871
http://llvm.org/viewvc/llvm-project?view=rev&revision=81936
http://llvm.org/viewvc/llvm-project?view=rev&revision=81945
llvm-svn: 90718
2009-12-06 21:14:13 +00:00
Steve Naroff
287a2bfc03
Integrate the following from the 'objective-rewrite' branch:
...
http://llvm.org/viewvc/llvm-project?view=rev&revision=86026
Note: The 'improved debugging' changes weren't integrated (since they were later reverted, since they didn't improve debugging).
llvm-svn: 90693
2009-12-06 01:52:22 +00:00
Steve Naroff
94ed6dc906
Integrate the following from the 'objective-rewrite' branch:
...
http://llvm.org/viewvc/llvm-project?view=rev&revision=82174
llvm-svn: 90692
2009-12-06 01:48:44 +00:00
Steve Naroff
2b3843df1b
Integrate the following from the 'objective-rewrite' branch:
...
http://llvm.org/viewvc/llvm-project?view=rev&revision=72893
llvm-svn: 90690
2009-12-06 01:33:56 +00:00
Benjamin Kramer
acc5fa153d
Don't call back() on an empty vector.
...
llvm-svn: 90678
2009-12-05 22:16:51 +00:00
Steve Naroff
ec60b43ee2
Integrate the following from the 'objective-rewrite' branch:
...
http://llvm.org/viewvc/llvm-project?view=rev&revision=71225
http://llvm.org/viewvc/llvm-project?view=rev&revision=73207
http://llvm.org/viewvc/llvm-project?view=rev&revision=73414
llvm-svn: 90677
2009-12-05 21:43:12 +00:00
Steve Naroff
e70a52a00c
Integrate the following from the 'objective-rewrite' branch:
...
http://llvm.org/viewvc/llvm-project?view=rev&revision=71086
http://llvm.org/viewvc/llvm-project?view=rev&revision=71107
Note: This fixes <rdar://problem/6845623> from protocol to template.
llvm-svn: 90665
2009-12-05 15:55:59 +00:00
Steve Naroff
b0e3390f53
Integrate the following from the 'objective-rewrite' branch:
...
http://llvm.org/viewvc/llvm-project?view=rev&revision=70978
llvm-svn: 90597
2009-12-04 21:36:32 +00:00
Steve Naroff
3ce3af2cb6
Integrate the following from the 'objective-rewrite' branch:
...
http://llvm.org/viewvc/llvm-project?view=rev&revision=70922
llvm-svn: 90595
2009-12-04 21:18:19 +00:00
Douglas Gregor
ed6c744091
Centralize and complete the computation of value- and type-dependence for DeclRefExprs
...
llvm-svn: 89649
2009-11-23 11:41:28 +00:00
Ted Kremenek
9b124e10a4
Add SourceLocations to ObjCClassDecl for the class identifiers referenced by @class.
...
llvm-svn: 89170
2009-11-18 00:28:11 +00:00
John McCall
4c98fd8953
Preserve type source information in sizeof/alignof expressions, and pass it
...
through to indexing.
llvm-svn: 86018
2009-11-04 07:28:41 +00:00
John McCall
703a3f8a7b
Preserve type source information in TypedefDecls. Preserve it across
...
template instantiation. Preserve it through PCH. Show it off to the indexer.
I'm healthily ignoring the vector type cases because we don't have a sensible
TypeLoc implementation for them anyway.
llvm-svn: 84994
2009-10-24 08:00:42 +00:00
Daniel Dunbar
07d0785dbb
PR5218: Replace IdentifierInfo::getName with StringRef version, now that clients
...
are updated.
llvm-svn: 84447
2009-10-18 21:17:35 +00:00
Daniel Dunbar
70e7eadd15
Move misc clients to IdentifierInfo StringRef API.
...
- strcmp -> ==
- OS.write(II->getName() ...) -> OS << II->getNameStr()
- Avoid std::string concatenation
- Use getNameStr().str() when an std::string is really needed.
llvm-svn: 84437
2009-10-18 20:26:27 +00:00
Daniel Dunbar
2c422dc9ca
Move clients to use IdentifierInfo::getNameStart() instead of getName()
...
llvm-svn: 84436
2009-10-18 20:26:12 +00:00
John McCall
8ccfcb51ee
Refactor the representation of qualifiers to bring ExtQualType out of the
...
Type hierarchy. Demote 'volatile' to extended-qualifier status. Audit our
use of qualifiers and fix a few places that weren't dealing with qualifiers
quite right; many more remain.
llvm-svn: 82705
2009-09-24 19:53:00 +00:00
John McCall
9dd450bb78
Change all the Type::getAsFoo() methods to specializations of Type::getAs().
...
Several of the existing methods were identical to their respective
specializations, and so have been removed entirely. Several more 'leaf'
optimizations were introduced.
The getAsFoo() methods which imposed extra conditions, like
getAsObjCInterfacePointerType(), have been left in place.
llvm-svn: 82501
2009-09-21 23:43:11 +00:00
Mike Stump
11289f4280
Remove tabs, and whitespace cleanups.
...
llvm-svn: 81346
2009-09-09 15:08:12 +00:00
Douglas Gregor
7e112b0d79
Source location information for ? and : in a ConditionalOperator, from Enea Zaffanella
...
llvm-svn: 80097
2009-08-26 14:37:04 +00:00
Benjamin Kramer
89b422c118
Replace cerr with errs().
...
llvm-svn: 79854
2009-08-23 12:08:50 +00:00
Daniel Dunbar
dec484abfb
Convert parts of Rewriter to StringRef based API.
...
- Please accept my sincere apologies for the gratuitous elimination of code
duplication, manual string length counting, unnecessary strlen calls, etc.
llvm-svn: 79448
2009-08-19 19:10:30 +00:00
Argyrios Kyrtzidis
60ed560428
Introduce DeclaratorDecl and pass DeclaratorInfo through the Decl/Sema interfaces.
...
DeclaratorDecl contains a DeclaratorInfo* to keep type source info.
Subclasses of DeclaratorDecl are FieldDecl, FunctionDecl, and VarDecl.
EnumConstantDecl still inherits from ValueDecl since it has no need for DeclaratorInfo.
Decl/Sema interfaces accept a DeclaratorInfo as parameter but no DeclaratorInfo is created yet.
llvm-svn: 79392
2009-08-19 01:27:57 +00:00
Anders Carlsson
a26159261c
Add a CastKind enum to CastExpr. Right now it's not used for much but it will be :)
...
llvm-svn: 77650
2009-07-31 00:48:10 +00:00