Douglas Gregor
fb65e592e0
Add support for C++0x unicode string and character literals, from Craig Topper!
...
llvm-svn: 136210
2011-07-27 05:40:30 +00:00
Chandler Carruth
d48db2115a
Rename getInstantiationLineNumber to getExpansionLineNumber in both
...
SourceManager and FullSourceLoc.
llvm-svn: 135969
2011-07-25 21:09:52 +00:00
Chandler Carruth
35f5320d8e
Mechanically rename SourceManager::getInstantiationLoc and
...
FullSourceLoc::getInstantiationLoc to ...::getExpansionLoc. This is part
of the API and documentation update from 'instantiation' as the term for
macros to 'expansion'.
llvm-svn: 135914
2011-07-25 16:49:02 +00:00
Chris Lattner
0e62c1cc0b
remove unneeded llvm:: namespace qualifiers on some core types now that LLVM.h imports
...
them into the clang namespace.
llvm-svn: 135852
2011-07-23 10:55:15 +00:00
Jay Foad
9a6b09874d
Make more use of llvm::StringRef in various APIs. In particular, don't
...
use the deprecated forms of llvm::StringMap::GetOrCreateValue().
llvm-svn: 133515
2011-06-21 15:13:30 +00:00
Richard Smith
938f40b5aa
Implement support for C++11 in-class initialization of non-static data members.
...
llvm-svn: 132878
2011-06-11 17:19:42 +00:00
Ken Dyck
d9c83e6cdf
Replace a literal 8 with Context->getCharWidth() in
...
SynthesizeByrefCopyDestroyHelper(). No change in functionality intended.
llvm-svn: 130608
2011-04-30 16:08:27 +00:00
Richard Smith
dda56e4b4a
Support for C++11 (non-template) alias declarations.
...
llvm-svn: 129567
2011-04-15 14:24:37 +00:00
Chris Lattner
57540c5be0
fix a bunch of comment typos found by codespell. Patch by
...
Luis Felipe Strano Moraes!
llvm-svn: 129559
2011-04-15 05:22:18 +00:00
Anders Carlsson
752454092c
Add a flag to StringLiteral to keep track of whether the string is a pascal string or not.
...
llvm-svn: 129488
2011-04-14 00:40:03 +00:00
Fariborz Jahanian
fae2e8df37
Fixup more objc rwriter bug having to do with
...
rewriting of blocks which have objective-c
stuff which need be rewritten as well. // rdar://9254348
llvm-svn: 129300
2011-04-11 21:17:02 +00:00
Fariborz Jahanian
eae9c0e3df
Fixes a rewrting bug of a property-dot syntax expression inside
...
a block. First part of // rdar://9254348
llvm-svn: 129171
2011-04-08 23:48:29 +00:00
Fariborz Jahanian
c6078c87d1
Fixes a rewriter bug rewriting call to a byref
...
block pointer nested inside a block. // rdar:// 9204669
llvm-svn: 128747
2011-04-01 23:08:13 +00:00
Fariborz Jahanian
5bba75f1a7
ANother rewrite bug, rewriting a call of
...
__byref block. // rdar://9204669
llvm-svn: 128726
2011-04-01 19:19:28 +00:00
Fariborz Jahanian
ff51d4e559
Fix couple of rewriter bugs related to rewriting a
...
__block block declaration. //rdar://9204669
llvm-svn: 128682
2011-03-31 22:49:32 +00:00
Peter Collingbourne
e190dee7a5
Add support for the OpenCL vec_step operator, by generalising and
...
extending the existing support for sizeof and alignof. Original
patch by Guy Benyei.
llvm-svn: 127475
2011-03-11 19:24:49 +00:00
Abramo Bagnara
29c2d46786
Fixed InnerLocStart.
...
llvm-svn: 127330
2011-03-09 14:09:51 +00:00
Abramo Bagnara
dff1930bf7
Fixed source range for all DeclaratorDecl's.
...
llvm-svn: 127225
2011-03-08 08:55:46 +00:00
Abramo Bagnara
b3185b00c5
Fixed TypedefDecl and TemplateTypeParameter source range.
...
llvm-svn: 127119
2011-03-06 15:48:19 +00:00
Fariborz Jahanian
8f4903397d
Fix objc rewriting bug casting to qualified objective-c pointetr.
...
// rdar://9056351
llvm-svn: 126536
2011-02-26 01:31:36 +00:00
Fariborz Jahanian
f2890fc93f
Fix a rewriter bug involving call to property's
...
block. // rdar://9055596
llvm-svn: 126535
2011-02-26 00:33:41 +00:00
Fariborz Jahanian
74405b02f9
Fix a rewrite bug. // rdar://9039342
...
llvm-svn: 126435
2011-02-24 21:29:21 +00:00
John McCall
c07a0c7e48
Change the representation of GNU ?: expressions to use a different expression
...
class and to bind the shared value using OpaqueValueExpr. This fixes an
unnoticed problem with deserialization of these expressions where the
deserialized form would lose the vital pointer-equality trait; or rather,
it fixes it because this patch also does the right thing for deserializing
OVEs.
Change OVEs to not be a "temporary object" in the sense that copy elision is
permitted.
This new representation is not totally unawkward to work with, but I think
that's really part and parcel with the semantics we're modelling here. In
particular, it's much easier to fix things like the copy elision bug and to
make the CFG look right.
I've tried to update the analyzer to deal with this in at least some
obvious cases, and I think we get a much better CFG out, but the printing
of OpaqueValueExprs probably needs some work.
llvm-svn: 125744
2011-02-17 10:25:35 +00:00
Fariborz Jahanian
9cd649d376
Block rewriting bug. Don't take address of captured
...
byref variables again when passing them to inner blocks.
// rdar://9006279
llvm-svn: 125690
2011-02-16 22:37:10 +00:00
John McCall
8322c3a197
Give some convenient idiomatic accessors to Stmt::child_range and
...
Stmt::const_child_range, then make a bunch of places use them instead
of the individual iterator accessors.
llvm-svn: 125450
2011-02-13 04:07:26 +00:00
John McCall
351762cda2
A few more tweaks to the blocks AST representation:
...
- BlockDeclRefExprs always store VarDecls
- BDREs no longer store copy expressions
- BlockDecls now store a list of captured variables, information about
how they're captured, and a copy expression if necessary
With that in hand, change IR generation to use the captures data in
blocks instead of walking the block independently.
Additionally, optimize block layout by emitting fields in descending
alignment order, with a heuristic for filling in words when alignment
of the end of the block header is insufficient for the most aligned
field.
llvm-svn: 125005
2011-02-07 10:33:21 +00:00
Fariborz Jahanian
ee504a0881
Fix an objective-c rewriter bug rewriting a __block
...
variable declaration of a struct declared type.
// rdar://8918702
llvm-svn: 124451
2011-01-27 23:18:15 +00:00
John McCall
424cec97bd
Change QualType::getTypePtr() to return a const pointer, then change a
...
thousand other things which were (generally inadvertantly) relying on that.
llvm-svn: 123814
2011-01-19 06:33:43 +00:00
Jeffrey Yasskin
8dfa5f1776
Fix warnings found by gcc-4.6, from -Wunused-but-set-variable and
...
-Wint-to-pointer-cast.
llvm-svn: 123719
2011-01-18 02:00:16 +00:00
Abramo Bagnara
6d8106386c
Added missing IgnoreParens().
...
llvm-svn: 121795
2010-12-14 22:11:44 +00:00
John McCall
db40c7f573
Restore r121752 without modification.
...
llvm-svn: 121763
2010-12-14 08:05:40 +00:00
John McCall
5546da68bb
Pull out r121752 in case it's causing the selfhost breakage.
...
llvm-svn: 121759
2010-12-14 07:30:51 +00:00
John McCall
aa6d98c160
Factor out most of the extra state in a FunctionProtoType into a separate
...
class to be passed around. The line between argument and return types and
everything else is kindof vague, but I think it's justifiable.
llvm-svn: 121752
2010-12-14 06:51:39 +00:00
Argyrios Kyrtzidis
d0039e56f2
Keep the source location of the selector in ObjCMessageExpr.
...
llvm-svn: 121516
2010-12-10 20:08:27 +00:00
Fariborz Jahanian
83e7d5a90a
Fix rewriter to match recent changes in property ref
...
AST.
llvm-svn: 120919
2010-12-04 21:22:13 +00:00
John McCall
b7bd14fa08
Simplify the ASTs by consolidating ObjCImplicitGetterSetterExpr and ObjCPropertyRefExpr
...
into the latter.
llvm-svn: 120643
2010-12-02 01:19:52 +00:00
Nico Weber
1879bca4c9
Minor whitespace fix, no functionality change
...
llvm-svn: 119965
2010-11-22 10:26:41 +00:00
John McCall
4bc41aee2b
Add an assertion, fix a whole bunch of bugs, comment the assertion
...
out because there are still bugs left.
llvm-svn: 119722
2010-11-18 19:01:18 +00:00
John McCall
7decc9e4ea
Calculate the value kind of an expression when it's created and
...
store it on the expression node. Also store an "object kind",
which distinguishes ordinary "addressed" l-values (like
variable references and pointer dereferences) and bitfield,
@property, and vector-component l-values.
Currently we're not using these for much, but I aim to switch
pretty much everything calculating l-valueness over to them.
For now they shouldn't necessarily be trusted.
llvm-svn: 119685
2010-11-18 06:31:45 +00:00
John McCall
f608debd9b
Kill CK_Unknown references in the ObjC rewriter. The actual
...
choice of cast doesn't matter here, but I've tried to choose
the right one anyway.
llvm-svn: 119140
2010-11-15 09:46:46 +00:00
Fariborz Jahanian
086a24a2be
Fixes a rewrite bug, rewriting nested property usage
...
inside blocks. Fixes //rdar: //8608293.
llvm-svn: 118425
2010-11-08 18:37:50 +00:00
Fariborz Jahanian
90d2e57ff7
Proper rewriting of block envokation with
...
qualified ObjC pointer types in its argument list.
// rdar: //8608902
llvm-svn: 118286
2010-11-05 18:34:46 +00:00
Fariborz Jahanian
733dde6035
Fixes a rewriting bug when type in a block argument type
...
is a objc qualified class type. // rdar: //8608902
llvm-svn: 118208
2010-11-03 23:50:34 +00:00
Fariborz Jahanian
147e1cbb49
Patch to rewrite objc qualified types which occur in
...
block pointer type arguments. Partial fix for
// rdar: //8608902
llvm-svn: 118205
2010-11-03 23:29:24 +00:00
Nick Lewycky
508ef2c350
Correct typos and whitespace, spotted by Nico Weber!
...
llvm-svn: 117871
2010-10-31 21:07:24 +00:00
Fariborz Jahanian
bb40ea42e3
Fixes a potential crash in rewriter when sending message
...
to 'super'.
llvm-svn: 116928
2010-10-20 16:07:20 +00:00
Duncan Sands
3a02f3eeff
GCC 4.4 warns that Receiver may be used uninitialized in this function.
...
As far as I can see, gcc is right to think this! The following change
will cause a nice segfault rather than undefined behaviour if this case
occurs. Someone who understands what this code is supposed to do should
probably take a proper look.
llvm-svn: 116917
2010-10-20 08:21:16 +00:00
Fariborz Jahanian
7c299bc6fa
Do not rewrite new accessor if user has defined accessors.
...
Fixes //rdar: // 8570020.
llvm-svn: 116882
2010-10-19 23:47:54 +00:00
Ted Kremenek
c81155eef7
Silence uninitialized value warning.
...
llvm-svn: 116877
2010-10-19 23:10:22 +00:00
Fariborz Jahanian
1cee0adea3
Fix a rewriting bug of rewriting properties declared in
...
protocols. // rdar: //8558702
llvm-svn: 116652
2010-10-16 00:29:27 +00:00