Fariborz Jahanian
6c9e5a2b9e
Introduce getConstantArrayElementCount API and use it in
...
construction/destruction of array members.
llvm-svn: 79637
2009-08-21 16:31:06 +00:00
Mike Stump
c947a87655
Fix typo.
...
llvm-svn: 79632
2009-08-21 15:22:41 +00:00
Zhongxing Xu
54f87880e7
Eagerly bind 'self' to SelfRegion. Thus we do not need to get code decl from
...
GRStateManager to create the SelfRegion.
llvm-svn: 79628
2009-08-21 13:25:15 +00:00
Daniel Dunbar
145c59d079
Fix commentos
...
llvm-svn: 79610
2009-08-21 08:24:45 +00:00
Daniel Dunbar
b3252cc860
Fix refacto.
...
llvm-svn: 79609
2009-08-21 08:22:12 +00:00
Sanjiv Gupta
91f8cd9a91
Reversing part of 79544.
...
Need to find a new way to do target specific semanitc checking.
llvm-svn: 79596
2009-08-21 04:58:03 +00:00
Zhongxing Xu
71900fbac7
Get the code decl from the initial location context.
...
llvm-svn: 79591
2009-08-21 03:05:36 +00:00
Zhongxing Xu
871918c76f
Get the code decl from the initial location context.
...
llvm-svn: 79590
2009-08-21 02:58:11 +00:00
Daniel Dunbar
6d886b056a
gcc told me to add these.
...
llvm-svn: 79589
2009-08-21 02:43:05 +00:00
Zhongxing Xu
6be1a4e832
Tie the local check NSErrorCheck to a Decl to pave the way
...
to untie the ExplodedGraph from a specific Decl.
llvm-svn: 79588
2009-08-21 02:18:44 +00:00
Mike Stump
a002945a20
We now support overriding base functions in vtables. WIP.
...
llvm-svn: 79587
2009-08-21 01:45:00 +00:00
Daniel Dunbar
b789d61a6e
Remove comma at the end of enumerator list.
...
llvm-svn: 79586
2009-08-21 00:54:25 +00:00
Argyrios Kyrtzidis
6032ef1aa3
Remove TypeSpecStartLocation from VarDecl/FunctionDecl/FieldDecl, and use DeclaratorInfo to get this information.
...
llvm-svn: 79584
2009-08-21 00:31:54 +00:00
Douglas Gregor
a8eed7dabb
Make the new Objective-C "id" and "Class" redefinition types special
...
types that are preloaded by the PCH file. Fixes PCH breakage
introduced in r79248.
llvm-svn: 79583
2009-08-21 00:27:50 +00:00
Douglas Gregor
97628d6a4c
Implement support for calling member function templates, which involves:
...
- Allowing one to name a member function template within a class
template and on the right-hand side of a member access expression.
- Template argument deduction for calls to member function templates.
- Registering specializations of member function templates (and
finding them later).
llvm-svn: 79581
2009-08-21 00:16:32 +00:00
Ted Kremenek
d5eaa05a7f
Center the dragon.
...
llvm-svn: 79580
2009-08-21 00:04:20 +00:00
Ted Kremenek
0370089637
Make the dragon a link...
...
llvm-svn: 79577
2009-08-20 23:49:30 +00:00
Ted Kremenek
7c6b2faea8
Include LLVM logo ... because dragons are cool.
...
llvm-svn: 79576
2009-08-20 23:48:37 +00:00
Fariborz Jahanian
9c0d05454a
Added member arrays to more tests now that ir-gen supports it.
...
llvm-svn: 79575
2009-08-20 23:33:31 +00:00
Fariborz Jahanian
1a606ab12a
Patch to ir-gen destruction of array member elements in revers order
...
of their construction.
llvm-svn: 79571
2009-08-20 23:02:58 +00:00
Douglas Gregor
3447e76762
Initial support for parsing and representation of member function templates.
...
llvm-svn: 79570
2009-08-20 22:52:58 +00:00
Fariborz Jahanian
9c83720d17
ir-gen patch to destruct array members. WIP.
...
llvm-svn: 79565
2009-08-20 20:54:15 +00:00
Ted Kremenek
a298c0ee3c
Update checker build.
...
llvm-svn: 79559
2009-08-20 18:55:46 +00:00
Douglas Gregor
468535e552
Fix a typo in a variable name
...
llvm-svn: 79558
2009-08-20 18:46:05 +00:00
Daniel Dunbar
4cd55b0507
Don't install wpa or index-test tools.
...
llvm-svn: 79557
2009-08-20 18:45:52 +00:00
Sanjiv Gupta
b841d1baa1
Issue an error if the user specifies parameters in a function marked as ISR.
...
llvm-svn: 79544
2009-08-20 17:48:52 +00:00
Fariborz Jahanian
9a84665921
Using "ObjCImplicitSetterGetterRefExpr" instead of "ObjCImplctSetterGetterRefExpr".
...
A field rename and more comments.
llvm-svn: 79537
2009-08-20 17:02:02 +00:00
Mike Stump
cae6178b3b
Refine vbase offsets for the inductive case. Things are now starting
...
to come together nicely. Still a WIP.
llvm-svn: 79521
2009-08-20 07:22:17 +00:00
John McCall
950aac085d
Add syntax examples for the friend declaration types.
...
Remove an assert trivialized by dominating code.
llvm-svn: 79520
2009-08-20 07:19:42 +00:00
Douglas Gregor
ebe1010b0f
Refactor the instantiation of statements into a generic tree
...
transformation.
llvm-svn: 79519
2009-08-20 07:17:43 +00:00
Chris Lattner
f6bad8690f
Improve the Getting Started and Hacking web pages, patch by
...
John Thompson!
llvm-svn: 79518
2009-08-20 06:17:11 +00:00
Ted Kremenek
815fbb6026
retain/release checker: Treat NSObject method '-awakeAfterUsingCoder:'
...
just as if it behaved like an init function. This fixes <rdar://problem/7129086>.
llvm-svn: 79515
2009-08-20 05:13:36 +00:00
Ted Kremenek
e95b439cc3
Make this test case more portable by removing its dependency on system header files.
...
llvm-svn: 79511
2009-08-20 04:48:23 +00:00
Eli Friedman
629ffb9ad3
Fix bit-field promotion to be a bit closer to the behavior of gcc.
...
Patch by Enea Zaffanella, with some simplifications/corrections to
isPromotableBitField by me.
llvm-svn: 79510
2009-08-20 04:21:42 +00:00
Zhongxing Xu
1a3ec57520
If the 'while' has an empty body, set the body to the continue target block.
...
Although this does not make the CFG more correct, it makes the CFG more
beautiful without multiple roots.
llvm-svn: 79509
2009-08-20 03:21:49 +00:00
Zhongxing Xu
a778b02e89
If the body of for loop is empty, set its body to the continue target.
...
Otherwise we get a wrong CFG.
llvm-svn: 79507
2009-08-20 02:56:48 +00:00
Mike Stump
2220447adc
Ensure we don't output repeated vbase offsets. I have a testcase for
...
this, but need to fixup the actual offset value before I can check it
in. WIP.
llvm-svn: 79506
2009-08-20 02:11:48 +00:00
John McCall
87a44eb98a
Basic nested-template implementation.
...
llvm-svn: 79504
2009-08-20 01:44:21 +00:00
Zhongxing Xu
068928b2a6
Rename: ProgramPoint::getContext() => ProgramPoint::getLocationContext().
...
llvm-svn: 79502
2009-08-20 01:23:34 +00:00
Fariborz Jahanian
dd46eb770f
Test case for my last patch plus a minor clean up.
...
llvm-svn: 79500
2009-08-20 01:01:06 +00:00
Ted Kremenek
d982f001c9
retain/release checker: Special case handling of CFAttributedStringSetAttribute,
...
fixing <rdar://problem/7152619>. Along the way, merge test cases in
'test/Analysis/rdar-6539791.c' into 'test/Analysis/retain-release.m'.
llvm-svn: 79499
2009-08-20 00:57:22 +00:00
Fariborz Jahanian
eeb0e57247
ir-gen for multi-dimensional array construction. WIP.
...
llvm-svn: 79497
2009-08-20 00:15:15 +00:00
Ted Kremenek
eebcf574dd
Enhance diagnostics concerning attribute 'ns_returns_retained' and 'cf_returns_retained' to present the range of the attribute and have the diagnostic location be the declaration that the attribute was falsely attached to. This solves the problem where these diagnostics were being suppressed when these attributes were wrapped in a macro that was defined in a system header.
...
llvm-svn: 79496
2009-08-19 23:56:48 +00:00
Argyrios Kyrtzidis
20cf19141f
Keep track of the right paren ')' source location in a function declarator.
...
llvm-svn: 79489
2009-08-19 23:14:54 +00:00
Fariborz Jahanian
a8fe2c26a8
Removed unneeded code for break/continue statements in
...
manufactured for-loop per Anders feedback (thanks).
- Fariborz
llvm-svn: 79466
2009-08-19 21:10:38 +00:00
Fariborz Jahanian
431c883287
ir-gen for constructing arrays as non-static data members. WIP.
...
llvm-svn: 79464
2009-08-19 20:55:16 +00:00
Eli Friedman
a9c3d71b59
Add TCE target to clang; patch by Mikael Lepistö.
...
llvm-svn: 79462
2009-08-19 20:47:07 +00:00
Daniel Dunbar
62c850fb8f
Remove now unnecessary helper methods.
...
llvm-svn: 79460
2009-08-19 20:32:38 +00:00
Daniel Dunbar
58bc48c14e
Switch to SmallString::str from SmallString::c_str.
...
- Several FIXMEs due to non-Twinification of IRBuilder.
llvm-svn: 79455
2009-08-19 20:04:03 +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
Daniel Dunbar
69c300d5e3
Use raw_svector_ostream for string concatenation.
...
llvm-svn: 79444
2009-08-19 18:30:37 +00:00
Mike Stump
3bc0a3bf7d
One second thought, I think I want to limit this class to just vtable
...
building activities.
llvm-svn: 79438
2009-08-19 18:10:47 +00:00
Mike Stump
b386941208
Cleanup: fold IndirectPrimary into builder.
...
llvm-svn: 79423
2009-08-19 14:40:47 +00:00
Mike Stump
3b09f004db
We don't want to confuse this layout with the BLayout from the builder.
...
llvm-svn: 79422
2009-08-19 14:06:50 +00:00
Mike Stump
6bc4aac878
Update for recent improvements.
...
llvm-svn: 79421
2009-08-19 13:36:31 +00:00
Zhongxing Xu
080fa0522b
Get the Decl from the current ExplodedNode. Eventually the diagnostic client
...
and other core analysis logic will be untied to a particular Decl.
llvm-svn: 79420
2009-08-19 12:50:00 +00:00
Benjamin Kramer
a48651de2d
Update CMakeLists.
...
llvm-svn: 79416
2009-08-19 12:02:15 +00:00
Eli Friedman
5ae98ee006
Make integer promotions work correctly on PIC16 and other platforms
...
where sizeof(short) == sizeof(int). Move UsualArithmeticConversionsType
out of Sema, since it was only there as a historical artifact. Patch by
Enea Zaffanella.
llvm-svn: 79412
2009-08-19 07:44:53 +00:00
Mike Stump
984c99d190
Restore vbase offsets for classes without a primary.
...
llvm-svn: 79402
2009-08-19 02:53:08 +00:00
Mike Stump
583ef62149
Refine vcalls a little.
...
llvm-svn: 79400
2009-08-19 02:06:38 +00:00
Argyrios Kyrtzidis
cc06621280
Fix a comment and improve an assert message.
...
llvm-svn: 79399
2009-08-19 01:46:06 +00:00
Argyrios Kyrtzidis
560ac97bf3
Store/load type source info from/to PCH files.
...
llvm-svn: 79396
2009-08-19 01:28:35 +00:00
Argyrios Kyrtzidis
c7148c974d
Use Sema's LocInfoType to pass and preserve type source info through the Parser.
...
llvm-svn: 79395
2009-08-19 01:28:28 +00:00
Argyrios Kyrtzidis
e918926d31
Introduce LocInfoType which is a Sema-specific implementation detail.
...
This is a Type subclass that can hold a DeclaratorInfo* when we have type source info coming
out of a declarator that we want to preserve. This is used only at the "border" of Parser/Sema for
passing/getting QualTypes, it does not participate in the type system semantics in any way.
llvm-svn: 79394
2009-08-19 01:28:17 +00:00
Argyrios Kyrtzidis
fc8b022810
Create and instantiate a DeclaratorInfo using a newly introduced Sema::GetDeclaratorInfoForDeclarator().
...
llvm-svn: 79393
2009-08-19 01:28:06 +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
Argyrios Kyrtzidis
3f79ad7405
Introduce DeclaratorInfo and TypeLoc, intended to be used for storing and reading source information for types.
...
DeclaratorInfo will contain a flat memory block for source information about a type that came out of a declarator.
TypeLoc and its subclasses will be used by clients as wrappers to "traverse" the memory block and read the information.
Both DeclaratorInfo and TypeLoc are not utilized in this commit.
llvm-svn: 79391
2009-08-19 01:27:32 +00:00
Anders Carlsson
ddd0b3c72a
Update Xcode project.
...
llvm-svn: 79390
2009-08-19 01:17:32 +00:00
Mike Stump
6fe6ca11da
Cleanup.
...
llvm-svn: 79374
2009-08-18 22:04:08 +00:00
Mike Stump
494c42526b
Add some documentation.
...
llvm-svn: 79373
2009-08-18 21:59:28 +00:00
Mike Stump
07347353a0
Cleanups. Move GenerateRtti to CodeGenModule.
...
llvm-svn: 79372
2009-08-18 21:49:00 +00:00
Fariborz Jahanian
19380c4b88
Renamed ClassProp data member of ObjCImplctSetterGetterRefExpr
...
to InterfaceDecl, as it is unrelated to any property and
holds the InterfaceDecl needed for accessing class getter/setter
methods using the dot-syntax.
llvm-svn: 79371
2009-08-18 21:37:33 +00:00
Mike Stump
ee81dca8c7
Move the rest of the vtable building code into the new builder.
...
llvm-svn: 79370
2009-08-18 21:30:21 +00:00
Mike Stump
1f18b9a301
Suck up method generation.
...
llvm-svn: 79367
2009-08-18 21:03:28 +00:00
Mike Stump
5cb34077ef
Split out vtable bulding code into a builder.
...
llvm-svn: 79366
2009-08-18 20:50:28 +00:00
Fariborz Jahanian
88cc2340de
Renamed ObjCKVCRefExpr to ObjCImplctSetterGetterRefExpr.
...
Removed an unnecessary loop to get to setters incoming
argument. Added DoxyGen comments. Still more work
to do in this area (WIP).
llvm-svn: 79365
2009-08-18 20:50:23 +00:00
Anders Carlsson
a192947509
Change ActOnReturnStmt to not take a FullExprArg. Instead, Sema will wrap the return expr inside a CXXExprWithTemporaries if needed.
...
llvm-svn: 79342
2009-08-18 16:11:00 +00:00
Zhongxing Xu
7864b9ea0c
Remove unused parameter BugReporter due to previous patch.
...
llvm-svn: 79328
2009-08-18 08:58:41 +00:00
Zhongxing Xu
4c76dbc758
Now we can get the CFG from the ProgramPoint. No need to pass in the
...
BugReporter.
llvm-svn: 79327
2009-08-18 08:46:04 +00:00
Daniel Dunbar
d04405f036
Add test for finding bfin backend.
...
llvm-svn: 79326
2009-08-18 07:07:14 +00:00
Daniel Dunbar
5232203234
Convert CreateTargetInfo to use a Triple instead of manul string munging.
...
- Patch by Yonggang Luo (with some formatting tweaks by Eli and myself).
llvm-svn: 79320
2009-08-18 05:47:58 +00:00
Daniel Dunbar
2a4061929f
Fix some made up triples.
...
llvm-svn: 79316
2009-08-18 05:30:27 +00:00
Ted Kremenek
9b2c79de59
Enhance static analyzer diagnostics by introducing a new 'EnhancedBugReporter'
...
which allows custom checks to register callback creator functions for creating
BugReporterVisitor objects. This allows various checks to include diagnostics
such as 'assuming value is null' with little extra work. Eventually this API
should be refactored to be cleaner and more simple.
llvm-svn: 79302
2009-08-18 01:05:30 +00:00
John McCall
5ed6e8f54c
Teach Sema how to pop out of friend function definitions in nested classes.
...
llvm-svn: 79291
2009-08-18 00:00:49 +00:00
David Chisnall
26657ea8bc
Fixed typo in last commit pointed out by Anton.
...
llvm-svn: 79290
2009-08-17 23:18:30 +00:00
David Chisnall
de3a06933d
Changes to TargetABIInfo to (hopefully) select the correct calling convention. This has been tested on FreeBSD, and now correctly generates GCC-compatible code for functions returning small structures. Please test it on other platforms!
...
llvm-svn: 79288
2009-08-17 23:08:21 +00:00
Jakob Stoklund Olesen
0de52f906d
Support compilation for the blackfin back-end
...
llvm-svn: 79271
2009-08-17 20:08:44 +00:00
Fariborz Jahanian
d172e91f2a
Patch to 1) synthesizing non-trivial default destructor when
...
one is not provided by user. 2) More complete
emission of ctor prologue when it has no initializer
list or when it is synthesized.
llvm-svn: 79269
2009-08-17 19:04:50 +00:00
Anders Carlsson
49033712e4
Remove an ErrorUnsupported call.
...
llvm-svn: 79261
2009-08-17 18:24:57 +00:00
Daniel Dunbar
3a4fc4b2ec
XFAIL this test for now. David/Steve, please sort out the correct fix.
...
llvm-svn: 79259
2009-08-17 18:01:54 +00:00
David Chisnall
9f57c29053
Initial patch to support definitions of id and Class from headers in Objective-C code.
...
This currently breaks test/SemaObjC/id-isa-ref.m and issues some spurious warnings when you attempt to assign a struct objc_class* value to a Class variable. The test case probably should fail as it's written, because without the definition of Class the compiler should not assume struct objc_class* is a valid receiver type, but it's left broken because it would be nice if we could get that passing too for the special case of isa.
Approved by snaroff.
llvm-svn: 79248
2009-08-17 16:35:33 +00:00
Zhongxing Xu
b562444cf8
adjust indentation.
...
llvm-svn: 79236
2009-08-17 14:13:14 +00:00
Zhongxing Xu
a7a35bc2a6
Remove unused variable.
...
llvm-svn: 79229
2009-08-17 06:30:30 +00:00
Zhongxing Xu
5f078cb844
To make the analysis independent on the locally stored liveness and cfg
...
of GRStateManager and GRExprEngine, pass the initial location context
to the getInitialState() method.
llvm-svn: 79228
2009-08-17 06:19:58 +00:00
Erick Tryzelaar
b90731117c
Update lexer to work with the new APFloat string parsing.
...
llvm-svn: 79211
2009-08-16 23:36:28 +00:00
Anders Carlsson
81f0df9601
Improve handling of delete expressions.
...
llvm-svn: 79205
2009-08-16 21:13:42 +00:00
Anders Carlsson
115d6bfcac
Whoops, did not mean to commit this
...
llvm-svn: 79201
2009-08-16 20:29:59 +00:00
Anders Carlsson
a471db0dd4
Store the delete operator for delete expressions.
...
llvm-svn: 79200
2009-08-16 20:29:29 +00:00
Fariborz Jahanian
d262eda6fc
Patch toward synthesizing non-trivial destructors. WIP
...
llvm-svn: 79199
2009-08-16 19:36:17 +00:00
Mike Stump
996576f3aa
Refine vbase offset calculations. WIP.
...
llvm-svn: 79198
2009-08-16 19:04:13 +00:00
Anders Carlsson
3b848940d7
Only do this for initializers of course.
...
llvm-svn: 79197
2009-08-16 17:54:29 +00:00
Anders Carlsson
b80760bd78
Destroy bound temporaries.
...
llvm-svn: 79196
2009-08-16 17:50:25 +00:00
Chris Lattner
2ba5ca9d4f
Improve the diagnostic emitted when an unused ObjC property getter
...
is found. Instead of complaining about a generic "unused expr",
emit:
t.m:7:3: warning: property access result unused - getters should not have side effects
While objc property getters *could* have side effects, according to
the language best practices, they *shouldn't*. Hopefully the
diagnostic now gets this across.
llvm-svn: 79192
2009-08-16 16:57:27 +00:00
Chris Lattner
d37f61c1c6
fix my previous commit.
...
llvm-svn: 79191
2009-08-16 16:51:50 +00:00
Chris Lattner
d8b800ad31
This is an attempt to improve loc info for 'unused result' expression
...
warnings, but it fails because we don't have the location of the .
and I don't understand ObjCKVCRefExpr. I'll revisit this later.
llvm-svn: 79190
2009-08-16 16:45:18 +00:00
Anders Carlsson
5b106a7545
Add an IsInitializer flag to EmitAnyExpr. This is used to prevent temporaries from being destroyed when they're bound to a reference variable.
...
llvm-svn: 79179
2009-08-16 07:36:22 +00:00
Anders Carlsson
157c321b7c
No need to append extra padding now that we don't create packed structs for simple cases like the constant string.
...
llvm-svn: 79178
2009-08-16 05:55:31 +00:00
Anders Carlsson
250aada4b9
AddInitializerToDecl can't take a FullExprArg. Make it take an ExprArg, and create the CXXExprWithTemporaries before setting the initializer on the VarDecl.
...
llvm-svn: 79176
2009-08-16 05:13:48 +00:00
Anders Carlsson
e80ccac2cb
Call MaybeBindToTemporary for overloaded binary and unary operators.
...
llvm-svn: 79173
2009-08-16 04:11:06 +00:00
Anders Carlsson
1c83debc36
Call MaybeBindToTemporary when constructing functino call operator calls.
...
llvm-svn: 79172
2009-08-16 03:53:54 +00:00
Anders Carlsson
8c84c206d9
Add MaybeBindToTemporary calls for member call expressions.
...
llvm-svn: 79171
2009-08-16 03:42:12 +00:00
Anders Carlsson
f898401305
Make sure to call MaybeBindToTemporary when creating CallExprs.
...
llvm-svn: 79168
2009-08-16 03:06:32 +00:00
Mike Stump
94bc52c03b
Use the -NEXT feature of FileCheck.
...
llvm-svn: 79166
2009-08-16 02:40:14 +00:00
Anders Carlsson
bc4c107836
Move builtin call checking out into a separate function, make CheckFunctionCall and CheckBlockCall return bool instead. No intended functionality change.
...
llvm-svn: 79157
2009-08-16 01:56:34 +00:00
Mike Stump
22ea1f8a30
Cleanups and fixups for calculating the virtual base offsets. WIP.
...
llvm-svn: 79156
2009-08-16 01:46:26 +00:00
Anders Carlsson
f86a8d1030
BuildCXXConstructExpr doesn't need to take an ASTContext.
...
llvm-svn: 79149
2009-08-15 23:41:35 +00:00
Eli Friedman
ea56303b09
Add an explicit constructor to ActiveTemplateInstantiation which
...
initializes all the members; this fixes a valgrind error in the
regression tests.
llvm-svn: 79148
2009-08-15 22:50:33 +00:00
Anders Carlsson
445af45c29
Add a simple test for temporaries.
...
llvm-svn: 79147
2009-08-15 22:30:50 +00:00
Eli Friedman
c80ca68423
Fix test failure due to uninitialized member.
...
llvm-svn: 79145
2009-08-15 22:23:00 +00:00
Eli Friedman
c96d4963eb
Implement __is_empty. Patch by Sean Hunt.
...
llvm-svn: 79143
2009-08-15 21:55:26 +00:00
Eli Friedman
e99c9c5b60
Ignore -Wno-import.
...
llvm-svn: 79128
2009-08-15 19:28:53 +00:00
Eli Friedman
da8d4def72
Don't perform integer promotions on the operand to a cast; this
...
simplifies the AST, and can matter in some rare cases involving
casts to vector types. Patch by Enea Zaffanella.
llvm-svn: 79126
2009-08-15 19:02:19 +00:00
Fariborz Jahanian
0aed0225b4
Improved on ir-gen for synthesis of non-trivial default
...
constructor body whose class has non-static data-members which
required non-trivial construction.
llvm-svn: 79125
2009-08-15 18:55:17 +00:00
Eli Friedman
2be79b3608
Add an additional C++ hardcoded search path.
...
llvm-svn: 79075
2009-08-15 03:45:14 +00:00
Eli Friedman
b360412582
Make test more precise.
...
llvm-svn: 79074
2009-08-15 03:40:49 +00:00
Eli Friedman
c0f6d44ef6
Make test a bit more precise.
...
llvm-svn: 79073
2009-08-15 03:35:55 +00:00
Zhongxing Xu
e1190f73a9
Extend the ProgramPoint to include the context information LocationContext,
...
which is either a stack frame context of the function or a local scope
context.
llvm-svn: 79072
2009-08-15 03:17:38 +00:00
Eli Friedman
04fddf0d1f
Fix for PR4721: adjust CodeGen and ASTContext so that we have a
...
consistent model for handling size expressions for VLAs.
The model is essentially as follows: VLA types own their associated
expression. In some cases, we need to create multiple VLA types to
represent a given VLA (for canonical types, or qualifiers on array types,
or type merging). If we need to create multiple types based off of
the same VLA declaration, we use the new refcounting functionality so they can
all own the expression. The VLASizeMap in CodeGenFunction then uses the size
expression to identify the group of VLA types based off of the same original
declaration.
I'm not particularly attached to the VLA types owning the expression,
but we're stuck with at least until someone comes up with a way
to walk the VLA expressions for a declaration.
I did the parallel fix in ASTContext for DependentSizedArrayType, but I
haven't really looked closely at it, so there might still be issues
there.
I'll clean up the code duplication in ASTContext in a followup commit.
llvm-svn: 79071
2009-08-15 02:50:32 +00:00
John McCall
deb8448690
Disable all recognition of main() in -ffreestanding. Addresses bug #4720 .
...
llvm-svn: 79070
2009-08-15 02:09:25 +00:00
Ted Kremenek
08479ae7fe
Change handling of attribute 'malloc' to only accept the attribute on function
...
declarations (and not function pointers). This is consistent with GCC. Accepting
this attribute on function pointers means that the attribute should be treated
as a type qualifier, which apparently is not what GCC does. We obviously can
change this later should we desire to enhance the 'malloc' attribute in this
way.
llvm-svn: 79060
2009-08-15 00:51:46 +00:00
Chris Lattner
8dc7626f9c
minor cleanups for VLA stuff.
...
llvm-svn: 79059
2009-08-15 00:03:43 +00:00
Chris Lattner
19efdd67dd
use GetVLASize instead of accessing VLASizeMap directly, this gets an assert if
...
VLASize isn't populated for the type yet.
llvm-svn: 79057
2009-08-14 23:43:22 +00:00
Benjamin Kramer
312fde6420
lit: flush stdout in no-fancy-progress-bar mode as well.
...
llvm-svn: 79056
2009-08-14 23:34:45 +00:00
Ted Kremenek
8d091dbe13
Add more attribute 'malloc' test cases involving function pointers.
...
llvm-svn: 79055
2009-08-14 22:06:01 +00:00
Ted Kremenek
f22c410efa
Per Eli Friedman's feedback, handle attribute 'malloc' being applied to
...
declarations of function pointers.
llvm-svn: 79053
2009-08-14 22:03:27 +00:00
Fariborz Jahanian
2e4a46b745
objc2's foreach statement's selector type can be
...
a block pointer too.
llvm-svn: 79050
2009-08-14 21:53:27 +00:00
Devang Patel
d4bbb08946
Do now overflow while calulating upper bound for zero sized array.
...
llvm-svn: 79043
2009-08-14 20:57:45 +00:00
Ted Kremenek
026d201eca
This test case does not need to include 'stdlib.h'.
...
llvm-svn: 79042
2009-08-14 20:53:10 +00:00
Ted Kremenek
420d9a7a5e
Use 'dyn_cast' instead of a check for a function declaration followed by a
...
'cast'.
llvm-svn: 79041
2009-08-14 20:51:58 +00:00
Ted Kremenek
527042b5a9
Improve Sema's handling of attribute 'malloc' to reject the attribute when
...
attaching to Objective-C methods (which mirrors GCC's behavior) and to allow the
return type of the function to be an Objective-C pointer or Block pointer (which
GCC also accepts).
Along the way, add 'const' to some of the pointer arguments of various utility
functions...
llvm-svn: 79040
2009-08-14 20:49:40 +00:00
Fariborz Jahanian
42af5ba7b7
ir-gen for generation of trvial copy constructor
...
call.
llvm-svn: 79034
2009-08-14 20:11:43 +00:00
Anders Carlsson
e827123f08
Make the CXXDefaultArgExpr constructor protected and add a static Create function.
...
llvm-svn: 79013
2009-08-14 18:30:22 +00:00
Ted Kremenek
d0d7256b8f
Pass '-Wno-' options to clang-cc. This fixes <rdar://problem/6943988>.
...
llvm-svn: 79011
2009-08-14 18:20:50 +00:00
Fariborz Jahanian
83b000c713
Fixed a regression in deciding when to issue warning on properties which
...
implement NSCopying protocol in GC mode.
llvm-svn: 79008
2009-08-14 18:06:25 +00:00
Ted Kremenek
bc16b4e211
Update/add links to developer meeting.
...
llvm-svn: 79005
2009-08-14 17:11:34 +00:00
Daniel Dunbar
f944cc5347
Fix a few typos.
...
llvm-svn: 78991
2009-08-14 04:43:04 +00:00
Shantonu Sen
4a7b937c4b
PR4715
...
-Wno-error disables WarningsAsErrors instead of
mistakenly being treated like -Werror
llvm-svn: 78987
2009-08-14 04:07:15 +00:00
Anders Carlsson
5d67a97513
Fix spacing
...
llvm-svn: 78981
2009-08-14 02:39:47 +00:00
John McCall
58de35804b
Support friend declarations in templates and test that argdep lookup
...
still works.
llvm-svn: 78979
2009-08-14 02:03:10 +00:00
Mike Stump
5aa7855e3a
Testcase for a recent checkin.
...
llvm-svn: 78974
2009-08-14 01:50:51 +00:00
Mike Stump
c4b7afed0f
Testcase for recent checkin.
...
llvm-svn: 78973
2009-08-14 01:48:56 +00:00
Mike Stump
7ba9c8752c
Testcase for a recent checkin.
...
llvm-svn: 78972
2009-08-14 01:46:56 +00:00
Mike Stump
bcf756cbac
Deconflate virtual base offsets from non-virtual base offsets.
...
Deconflate a virtual base primary from a non-virtual base.
llvm-svn: 78971
2009-08-14 01:44:03 +00:00
Fariborz Jahanian
92b3f47de2
Fixed a bug in ir-gen for copy assignment synthesis.
...
Fixed a bug when evaluating those copy-assignments
which need by lazily syntheized. A test case
for these.
llvm-svn: 78965
2009-08-14 00:01:54 +00:00
Mike Stump
9a1090a399
Add testcase for recent work.
...
llvm-svn: 78959
2009-08-13 23:33:29 +00:00
Owen Anderson
c36edfede5
Update for LLVM API change.
...
llvm-svn: 78957
2009-08-13 23:27:53 +00:00
Mike Stump
590a7c780c
We can't avoid doing the work to find all the indirect primary virtual
...
base classes as we'll need that to layout the virtual bases...
llvm-svn: 78954
2009-08-13 23:26:06 +00:00
Mike Stump
c2f591b1e6
Refine vtable layout for virtual bases and keep better track of
...
primaries. WIP.
llvm-svn: 78950
2009-08-13 22:53:07 +00:00
Owen Anderson
41a750271b
Update for LLVM API change.
...
llvm-svn: 78946
2009-08-13 21:57:51 +00:00
Fariborz Jahanian
3d693b22df
Adds testing of copy assignment of anonymous union
...
data members.
llvm-svn: 78943
2009-08-13 21:47:21 +00:00
Fariborz Jahanian
89d01eb3e4
More complete test for my previous patch.
...
llvm-svn: 78941
2009-08-13 21:38:50 +00:00
Fariborz Jahanian
4985b33fd7
Patch to force synthesis of copy assignment operator
...
function in the order according to c++03. ir-gen
for copy assignment in the trivial case and the first
test case.
llvm-svn: 78938
2009-08-13 21:09:41 +00:00
Mike Stump
2631d8c517
Minor cleanups.
...
llvm-svn: 78927
2009-08-13 18:39:54 +00:00
Mike Stump
1300754fdd
Prep for vbase layout refinements. WIP.
...
llvm-svn: 78882
2009-08-13 02:02:14 +00:00
Daniel Dunbar
e5515289fa
Update test
...
llvm-svn: 78877
2009-08-13 01:27:45 +00:00
Ryan Flynn
90964523f6
change cast to dyn_cast because d may not be a FunctionDecl
...
llvm-svn: 78876
2009-08-13 01:19:23 +00:00
Fariborz Jahanian
9b630c3040
Minor refactoring of copy assign operator ir-gen. SWIP.
...
llvm-svn: 78875
2009-08-13 00:53:36 +00:00
Mike Stump
6bb66bbd06
Refine virtual base layout. WIP.
...
llvm-svn: 78873
2009-08-13 00:34:14 +00:00
Ryan Flynn
a8fae2ebf4
change a dyn_cast to cast
...
llvm-svn: 78862
2009-08-12 23:36:28 +00:00
Fariborz Jahanian
bbd5e8c2cf
More toward synthesizing copy assignments. SWIP.
...
llvm-svn: 78861
2009-08-12 23:34:46 +00:00
Mike Stump
b661738203
Cleanup.
...
llvm-svn: 78858
2009-08-12 23:25:18 +00:00
Mike Stump
938f15b033
Refactor. WIP. Eventually, this will all go into a vtable builder class.
...
llvm-svn: 78857
2009-08-12 23:14:12 +00:00
Mike Stump
480212253a
Cleanup.
...
llvm-svn: 78855
2009-08-12 23:03:28 +00:00
Mike Stump
82165efbc4
Refactor.
...
llvm-svn: 78854
2009-08-12 23:00:59 +00:00
Mike Stump
dc94d3fd27
Refactor.
...
llvm-svn: 78851
2009-08-12 22:34:12 +00:00
Mike Stump
cb2752bb5d
Remove another done audit FIXME.
...
llvm-svn: 78847
2009-08-12 22:10:00 +00:00
Mike Stump
aa08da7906
Refactor a bit and remove some FIXME audit markers, now that the code
...
has been audited for correctness.
llvm-svn: 78846
2009-08-12 22:06:55 +00:00
Mike Stump
6f3793b406
Refine primary vbase selection ordering. WIP.
...
llvm-svn: 78844
2009-08-12 21:50:08 +00:00
Fariborz Jahanian
de7d4c264a
Patch for synthesizing copy assignment operator.
...
WIP.
llvm-svn: 78841
2009-08-12 21:14:35 +00:00
Mike Stump
9deb22b850
Improve the secondary vtables to not include vbase offsets. WIP.
...
llvm-svn: 78831
2009-08-12 18:50:26 +00:00
Fariborz Jahanian
887cd6a8eb
error on property of objc interface type instead of crashing
...
llvm-svn: 78826
2009-08-12 18:17:53 +00:00
Chris Lattner
91f5ff6bce
improve path handling, patch by Baptiste Lepilleur!
...
llvm-svn: 78824
2009-08-12 17:50:39 +00:00
Mike Stump
cecfe61cd1
Refine vtable building for the secondary vtables to exclude yet more
...
cases where a virtual base was already used as a primary base class.
WIP.
llvm-svn: 78820
2009-08-12 17:42:21 +00:00
Chris Lattner
859c37a5d9
use the new llvm::Triple parsing stuffola for handling darwin version #'s.
...
llvm-svn: 78794
2009-08-12 06:24:27 +00:00
Nate Begeman
4874592208
Transition the PCH support for ShuffleVectorExpr over to ASTContext allocation
...
llvm-svn: 78783
2009-08-12 02:28:50 +00:00
Zhongxing Xu
0d375cdcb1
More cleanups.
...
llvm-svn: 78782
2009-08-12 02:28:32 +00:00
Zhongxing Xu
ccffe0953e
Remove redundant forward declarations.
...
llvm-svn: 78781
2009-08-12 02:23:28 +00:00
Nate Begeman
f485fb55d8
Fix a fixme by allocating ShuffleVectorExprs in the Context
...
llvm-svn: 78780
2009-08-12 02:10:25 +00:00
Dan Gohman
b321039271
Use the new nsw form of add for signed integer addition.
...
llvm-svn: 78765
2009-08-12 01:16:29 +00:00
Fariborz Jahanian
853d21a18a
Warn on use of property dot syntax when unused.
...
llvm-svn: 78760
2009-08-12 00:45:33 +00:00
Dan Gohman
43b4484f87
Use the inbounds variant of getelementptr for common pointer arithmetic.
...
llvm-svn: 78756
2009-08-12 00:33:55 +00:00
Anders Carlsson
0738468322
Add some information about temporaries to the statement dumper.
...
llvm-svn: 78754
2009-08-12 00:21:52 +00:00
Benjamin Kramer
b3788a24c6
Rename macro to avoid a name clash on FreeBSD.
...
llvm-svn: 78741
2009-08-11 22:46:25 +00:00
Dan Gohman
1cebe56735
Remove the hack that turns sdiv by a power of 2 to ashr, and
...
use the new "exact" sdiv to allow LLVM optimization to perform
this transformation.
llvm-svn: 78739
2009-08-11 22:40:09 +00:00
Benjamin Kramer
854d7dec5a
Add newline at end of file.
...
llvm-svn: 78735
2009-08-11 22:33:06 +00:00
Fariborz Jahanian
3f8917abf6
Patch to warn if a property which is 'assign' by default
...
may not implement NSCopying protocol in -fobjc-gc[-only] mode.
llvm-svn: 78726
2009-08-11 22:02:25 +00:00
John McCall
2658c4e2d9
Add a FriendClassDecl type for holding declarations of friend types in
...
the AST, and create such declarations.
llvm-svn: 78719
2009-08-11 21:13:21 +00:00
Chris Lattner
66a388b859
merge two tests.
...
llvm-svn: 78705
2009-08-11 20:08:52 +00:00
Chris Lattner
f1c9797ffa
Fix rdar://7126285: don't warn on unused ObjC property access
...
that uses "dot syntax" since it might have a side effect.
llvm-svn: 78704
2009-08-11 20:08:03 +00:00
Fariborz Jahanian
b2197042b8
ir-gen support for anonymous union data member
...
copying in copy constructors and used in
default constructor's initializer list.
llvm-svn: 78700
2009-08-11 18:49:54 +00:00
Daniel Dunbar
d362857f4c
Update test case.
...
llvm-svn: 78699
2009-08-11 18:37:40 +00:00
Benjamin Kramer
9cd050ab07
LLVMContext is a class now.
...
llvm-svn: 78691
2009-08-11 17:46:57 +00:00
Douglas Gregor
2168a9f25f
Fix DISABLE_SMART_POINTERS build
...
llvm-svn: 78674
2009-08-11 15:56:57 +00:00
John McCall
d1e9d835f3
Argument-dependent lookup for friend declarations. Add a new decl type,
...
FriendFunctionDecl, and create instances as appropriate.
The design of FriendFunctionDecl is still somewhat up in the air; you can
befriend arbitrary types of functions --- methods, constructors, etc. ---
and it's not clear that this representation captures that very well.
We'll have a better picture when we start consuming this data in access
control.
llvm-svn: 78653
2009-08-11 06:59:38 +00:00
Douglas Gregor
a16548e301
Refactor the template-instantiation logic for expressions into a
...
generic tree transformation (also used for recanonicalization) and a
small amount of template-instantiation-specific logic.
llvm-svn: 78645
2009-08-11 05:31:07 +00:00
Argyrios Kyrtzidis
ae438f8c03
Check whether a tag was defined in a C++ condition declaration using GetTypeForDeclarator.
...
llvm-svn: 78644
2009-08-11 05:20:41 +00:00
Mike Stump
78696a70bf
Implement more of the inductive case for vtable layout involving
...
virtual base primaries and improve the layout of classes with virtual
bases. WIP.
Hey, I've decided I want a change to FileCheck, I need to ensure that
the group is together, nothing in between. Can we change it to check
the match line is from the line immediately following the last matched
line, if the source for the matched line is immediately after the
source for the previously matched line?
// CHECK: 1
// CHECK: 2
// CHECK: 3
// CHECK: 4
// CHECK: 5
// CHECK: 6
would require 1 2 and 3 to be continuous in the output, and 4 5 and 6
to be continuous.
llvm-svn: 78638
2009-08-11 04:03:59 +00:00
Fariborz Jahanian
4898990524
Fix an indentation.
...
llvm-svn: 78624
2009-08-10 23:59:59 +00:00
Fariborz Jahanian
296584b2a9
Support for anonymous union in ctor's initializer and
...
bunch of FIXMEs for their is-gen.
llvm-svn: 78623
2009-08-10 23:56:17 +00:00
Nate Begeman
5ec4b318e3
Take 2 on AltiVec-style vector initializers.
...
Fixes PR4704 problems
Addresses Eli's patch feedback re: ugly cast code
Updates all postfix operators to remove ParenListExprs. While this is awful,
no better solution (say, in the parser) is obvious to me. Better solutions
welcome.
llvm-svn: 78621
2009-08-10 23:49:36 +00:00
Anders Carlsson
ed1674d971
Add a CastInfo struct that will be used for cast information when constructing cast expressions. Right now it only stores the cast kind, but in the future it might store conversion functions and constructors.
...
llvm-svn: 78599
2009-08-10 21:30:22 +00:00
Chris Lattner
30ba674391
fix a couple of problems with section attributes:
...
1. Passing something that isn't a string used to cause:
"argument to annotate attribute was not a string literal"
make it say "section attribute" instead.
2. Fix the location of the above message to point to the
bad argument instead of the section token.
3. Implement rdar://4341926, by diagnosing invalid section
specifiers in the frontend rather than letting them slip all
the way to the assembler (a QoI win).
An example of #3 is that we used to produce something like this:
/var/folders/n7/n7Yno9ihEm894640nJdSQU+++TI/-Tmp-//ccFPFGtT.s:2:Expected comma after segment-name
/var/folders/n7/n7Yno9ihEm894640nJdSQU+++TI/-Tmp-//ccFPFGtT.s:2:Rest of line ignored. 1st junk character valued 46 (.).
Daniel improved clang to use llvm_report_error, so now we got:
$ clang t.c -c
fatal error: error in backend: Global variable 'x' has an invalid section specifier 'sadf': mach-o section specifier
requires a segment and section separated by a comma.
with no loc info. Now we get:
$ clang t.c -fsyntax-only
t.c:4:30: error: argument to 'section' attribute is not valid for this target: mach-o section specifier requires a segment
and section separated by a comma
int x __attribute__((section("sadf")));
^
which is nice :)
llvm-svn: 78586
2009-08-10 19:03:04 +00:00
Chris Lattner
2375952a47
these tests include section specifiers that aren't valid on the
...
mac, use an explicit triple.
llvm-svn: 78583
2009-08-10 18:56:44 +00:00
Fariborz Jahanian
9d3405ceab
minor refactoring. No change otherwise.
...
llvm-svn: 78582
2009-08-10 18:46:38 +00:00
Fariborz Jahanian
7cc52cf09f
ir-gen for generating copying of scalar data members in
...
a synthesized copy constructor.
llvm-svn: 78580
2009-08-10 18:34:26 +00:00
Mike Stump
68f0d31f25
Add walking bases in reverse order.
...
llvm-svn: 78578
2009-08-10 18:21:22 +00:00
Fariborz Jahanian
2a26e351fc
Fixed a ir-gen bug in synthesizing copy constructors.
...
llvm-svn: 78570
2009-08-10 17:20:45 +00:00
Daniel Dunbar
71f22e738a
Use LLVM's new error handler API to report back end errors using Diagnostic.
...
For example,
--
ddunbar@giles:Frontend$ clang -c backend-errors.c
fatal error: error in backend: Global variable 'a' has an invalid section specifier
'I AM, not, legal': mach-o section specifier uses an unknown section type.
--
compare to:
--
ddunbar@giles:Frontend$ gcc -c backend-errors.c
/var/folders/DQ/DQ8GT3++HESEzT1obWBynE+++TI/-Tmp-//cc45w2pq.s:2:Expected comma after segment-name
/var/folders/DQ/DQ8GT3++HESEzT1obWBynE+++TI/-Tmp-//cc45w2pq.s:2:Rest of line ignored. 1st junk character valued 77 (M).
--
Yay!
I am not tied to my wording choice, we could also go with "uncoverable error"
for the prefix, or just leave it off entirely.
llvm-svn: 78554
2009-08-10 03:40:28 +00:00
Daniel Dunbar
481fe50903
Revert r78535, it is causing a number of failures to build projects.
...
--- Reverse-merging r78535 into '.':
D test/Sema/altivec-init.c
U include/clang/Basic/DiagnosticSemaKinds.td
U include/clang/AST/Expr.h
U include/clang/AST/StmtNodes.def
U include/clang/Parse/Parser.h
U include/clang/Parse/Action.h
U tools/clang-cc/clang-cc.cpp
U lib/Frontend/PrintParserCallbacks.cpp
U lib/CodeGen/CGExprScalar.cpp
U lib/Sema/SemaInit.cpp
U lib/Sema/Sema.h
U lib/Sema/SemaExpr.cpp
U lib/Sema/SemaTemplateInstantiateExpr.cpp
U lib/AST/StmtProfile.cpp
U lib/AST/Expr.cpp
U lib/AST/StmtPrinter.cpp
U lib/Parse/ParseExpr.cpp
U lib/Parse/ParseExprCXX.cpp
llvm-svn: 78551
2009-08-10 03:01:36 +00:00
Ryan Flynn
e64ffc277c
warn, as gcc does, if __attribute__((malloc)) applied to function returning non-pointer type
...
llvm-svn: 78542
2009-08-09 22:36:29 +00:00
Ryan Flynn
1f1fdc070e
map previously ignored __attribute((malloc)) to noalias attribute of llvm function's return
...
llvm-svn: 78541
2009-08-09 20:07:29 +00:00
Anders Carlsson
f48123b413
Improve handling of member pointers.
...
llvm-svn: 78536
2009-08-09 18:26:27 +00:00
Nate Begeman
a96114ed08
AltiVec-style vector initializer syntax, vec4 a = (vec4)(a, b, c, d);
...
In addition to being defined by the AltiVec PIM, this is also the vector
initializer syntax used by OpenCL, so that vector literals are compatible
with macro arguments.
llvm-svn: 78535
2009-08-09 17:55:44 +00:00
Benjamin Kramer
b57e5d2f4f
Older GCCs don't have vector::data().
...
llvm-svn: 78519
2009-08-08 23:43:26 +00:00
Fariborz Jahanian
24f38969d5
ir-gen for initialization, in synthesize copy constructor,
...
of base/field which have trivial copy constructor.
llvm-svn: 78516
2009-08-08 23:32:22 +00:00
Anders Carlsson
b8be93fc92
Add support for global initializers.
...
llvm-svn: 78515
2009-08-08 23:24:23 +00:00
Anders Carlsson
f40886acca
Refactor some code and implement support for global destructors for static variables.
...
llvm-svn: 78507
2009-08-08 21:45:14 +00:00
Anders Carlsson
2c101b3cd1
Use CastExpr::CK_ArrayToPointerDecay and fix an assert.
...
llvm-svn: 78502
2009-08-08 21:04:35 +00:00
Anders Carlsson
e139f868b7
Add tests.
...
llvm-svn: 78491
2009-08-08 19:43:14 +00:00
Anders Carlsson
28a5fa29f3
Take #pragma pack into account when laying out structs. Fixes rdar://problem/7095436.
...
llvm-svn: 78490
2009-08-08 19:38:24 +00:00
Fariborz Jahanian
f6bda5d61e
Refactoring of copy ctor ir-gen. No change in functionality.
...
llvm-svn: 78489
2009-08-08 19:31:03 +00:00
Ryan Flynn
2f08571e4d
PR4700 - remove shift by 0 warning
...
llvm-svn: 78488
2009-08-08 19:18:23 +00:00
Anders Carlsson
68e0b68289
Introduce a new PragmaPack attribute, and use it for #pragma pack. The PackedAttr now only represents __attribute__((packed)).
...
This is necessary because #pragma pack and __attribute__((packed)) have different semantics. No functionality change yet, but this lays the groundwork for fixing a record layout bug.
llvm-svn: 78483
2009-08-08 18:23:56 +00:00
Anders Carlsson
453878bed4
Assert that the LLVM type has the same size as the RecordDecl size.
...
llvm-svn: 78481
2009-08-08 18:01:57 +00:00
Anders Carlsson
5fd7dad784
getFunctionLevelDeclContext needs to get the previous DeclContext if EnterDeclaratorContext has been called. Fixes PR4694. (Doug, please review)
...
llvm-svn: 78480
2009-08-08 17:48:49 +00:00
Anders Carlsson
b26ab816a2
Factor some code to get the "function level" DeclContext out into a separate function.
...
llvm-svn: 78478
2009-08-08 17:45:02 +00:00
Anders Carlsson
21776b75ce
Make sure to diagnose use of declarations in the case where we create an implicit CXXThisExpr.
...
llvm-svn: 78474
2009-08-08 16:55:18 +00:00
Daniel Dunbar
d3a114fe2d
Update test case; I don't really understand why packed enums changed this, but
...
the new havior is better so...
llvm-svn: 78473
2009-08-08 15:47:00 +00:00
Edward O'Callaghan
c69169d175
Patch should implement packed enums - PR4098. Credit to Anders Johnsen.
...
llvm-svn: 78471
2009-08-08 14:36:57 +00:00
Anders Carlsson
c5c57c3b86
Get rid of Stmt::Clone now that we can reference count statements instead.
...
llvm-svn: 78452
2009-08-08 02:50:17 +00:00
Douglas Gregor
2c742024ff
Introduce reference counting for statements and expressions, using it
...
to allow sharing of nodes. Simplifies some aspects of template
instantiation, and fixes both PR3444 and <rdar://problem/6757457>.
llvm-svn: 78450
2009-08-08 01:41:12 +00:00
Fariborz Jahanian
7c3d7f6c59
Remove use of uninitized variable.
...
llvm-svn: 78448
2009-08-08 00:59:58 +00:00
Fariborz Jahanian
59b3259284
Synthesize copying of non-static data members with
...
non-trivial copy constructors.
llvm-svn: 78445
2009-08-08 00:15:41 +00:00
Fariborz Jahanian
b68df0bc42
Synthesized copy constructor now generates code for
...
copying non-virtual base classes which have non-trivial
constructor. Work in progress.
llvm-svn: 78436
2009-08-07 23:51:33 +00:00
Anders Carlsson
8fc489da2a
Add a CK_ArrayToPointerDecay cast kind.
...
llvm-svn: 78434
2009-08-07 23:48:20 +00:00
Anders Carlsson
ec143777ba
Add CK_ToUnion and use it for aggregate expression codegen.
...
llvm-svn: 78429
2009-08-07 23:22:37 +00:00
Anders Carlsson
f10e414e4e
More CastKind work.
...
llvm-svn: 78415
2009-08-07 22:21:05 +00:00
John McCall
c7e8e795fa
Just add global scope to the associated namespaces set instead of tracking it
...
separately. Add the framework (currently unfed) for finding friend declarations
during argument-dependent lookup.
llvm-svn: 78414
2009-08-07 22:18:02 +00:00
Mike Stump
16644668cd
Add vbase offsets to the vtable. Wow, having an rbegin was so
...
fortuitous. WIP.
llvm-svn: 78413
2009-08-07 21:54:03 +00:00
Mike Stump
d9687fded6
Add rbegin and rend for virtual bases, might come in handy some day.
...
llvm-svn: 78412
2009-08-07 21:44:39 +00:00