Douglas Gregor
4165bd6772
Implement computation of the final overriders for each virtual
...
function within a class hierarchy (C++ [class.virtual]p2).
We use the final-overrider computation to determine when a particular
class is ill-formed because it has multiple final overriders for a
given virtual function (e.g., because two virtual functions override
the same virtual function in the same virtual base class). Fixes
PR5973.
We also use the final-overrider computation to determine which virtual
member functions are pure when determining whether a class is
abstract or diagnosing the improper use of an abstract class. The
prior approach to determining whether there were any pure virtual
functions in a class didn't cope with virtual base class subobjects
properly, and could not easily be fixed to deal with the oddities of
subobject hiding. Fixes PR6631.
llvm-svn: 99351
2010-03-23 23:47:56 +00:00
Fariborz Jahanian
519675bbf5
Add some missing files to xcode project
...
llvm-svn: 99318
2010-03-23 20:23:06 +00:00
Rafael Espindola
fa1708fdea
revert 99311. Looks like it broke darwin bootstrap.
...
llvm-svn: 99317
2010-03-23 19:55:22 +00:00
Ted Kremenek
5921b83f54
Improve diagnostic for @property/ivar type mismatch by including the types of the
...
ivar and @property respectively.
llvm-svn: 99312
2010-03-23 19:02:22 +00:00
Rafael Espindola
4d3745ade6
Avoid producing implicit methods when we have a explicit template instantiation
...
declaration.
llvm-svn: 99311
2010-03-23 18:56:16 +00:00
Fariborz Jahanian
6c67b90752
Code gen for compound assignment of complex
...
types using property syntax to access setter/getters.
(also radar 7351147).
llvm-svn: 99307
2010-03-23 18:43:00 +00:00
Anders Carlsson
55e89f877c
More work on thunks - don't assert if there's a variable with the same name as the thunk already.
...
llvm-svn: 99303
2010-03-23 18:18:41 +00:00
Fariborz Jahanian
3131496622
Patch to implement code gen. use of compound assignent on
...
properties of complex type. Radar 7351147.
llvm-svn: 99299
2010-03-23 18:08:50 +00:00
Anders Carlsson
cd836f0b5f
More thunks scaffolding.
...
llvm-svn: 99294
2010-03-23 17:17:29 +00:00
Anders Carlsson
5c5abad5d9
More work on thunks.
...
llvm-svn: 99287
2010-03-23 16:36:50 +00:00
Douglas Gregor
b525ef87fc
When recovering from a qualified typedef name, don't clear out the
...
DeclContext because we don't want a NULL DeclContext. Instead, use the
current context.
llvm-svn: 99281
2010-03-23 15:26:55 +00:00
Anders Carlsson
274fc82289
Move ThunkInfo as well.
...
llvm-svn: 99280
2010-03-23 15:17:13 +00:00
Anders Carlsson
67fd3a50dc
Move ReturnAdjustment and ThisAdjustment out into CGVtable.h
...
llvm-svn: 99279
2010-03-23 15:13:06 +00:00
Duncan Sands
de4fe3538a
Ignore a more comprehensive set of gcc-special format attributes.
...
llvm-svn: 99277
2010-03-23 14:44:19 +00:00
Zhongxing Xu
e248dca300
Bind the constructed object value to CXXConstructExpr.
...
llvm-svn: 99271
2010-03-23 09:13:17 +00:00
Zhongxing Xu
b473f91498
update CMakeLists.txt
...
llvm-svn: 99269
2010-03-23 08:14:19 +00:00
Zhongxing Xu
bf2f0d74a2
Clear the return expr GDM after using it.
...
llvm-svn: 99268
2010-03-23 08:09:29 +00:00
Zhongxing Xu
1ff3dcef1f
Add a AggExprVisitor class. It contains lots of boiler
...
plate code for evaluating expressions of C++ class type.
llvm-svn: 99267
2010-03-23 07:32:14 +00:00
Anders Carlsson
995891667f
Use the canonical destructor, which fixes the self-host build. Thanks to Eli for noticing.
...
llvm-svn: 99260
2010-03-23 05:15:24 +00:00
Zhongxing Xu
7fffbcc756
merge line.
...
llvm-svn: 99259
2010-03-23 05:13:26 +00:00
Daniel Dunbar
30b24e95fa
Frontend: Don't free the CompilerInstance or FrontendActions when running under
...
-disable-free. Among other things, this fixes freeing of the LLVM module on
exit.
- Note that this means we are disable-free'ing of a lot more stuff than we used to -- this should flush out bugs in anything left that is trying to do real work in its destructor. I did a mini-audit but '::~' is not totally uncommon.
llvm-svn: 99258
2010-03-23 05:09:16 +00:00
Daniel Dunbar
cb9eaf59fb
PPCallbacks: Add hook for reaching the end of the main file, and fix DependencyFile to not do work in its destructor.
...
llvm-svn: 99257
2010-03-23 05:09:10 +00:00
Zhongxing Xu
3c0c81a4d4
Since we now may have basicblocks with the same block is in different function,
...
change the block counter map from unsigned -> unsigned to
<StackFrameContext*, unsigned> -> unsigned.
llvm-svn: 99255
2010-03-23 05:05:02 +00:00
Anders Carlsson
917229cf75
Baby steps towards making thunks be emitted from the new vtable layout code.
...
llvm-svn: 99254
2010-03-23 04:59:02 +00:00
Anders Carlsson
7cea12ff9b
Some renames.
...
llvm-svn: 99253
2010-03-23 04:44:10 +00:00
Anders Carlsson
af82f63b47
Always emit associated thunks when emitting the function itself. Remove getVtableAddressPoint, it's not used.
...
llvm-svn: 99252
2010-03-23 04:31:31 +00:00
Anders Carlsson
8841024a7c
Rename MaybeEmitVtable to EmitVTableRelatedData in preparation for making it emit thunks as well.
...
llvm-svn: 99251
2010-03-23 04:15:00 +00:00
Anders Carlsson
a864caff8c
Rename CGVtableInfo to CodeGenVTables in preparation of adding another VTableInfo class.
...
llvm-svn: 99250
2010-03-23 04:11:45 +00:00
Ted Kremenek
a3ab0d7666
For forward-declared static inline functions, delay CFG-based warnings until we
...
encounter a definition.
llvm-svn: 99243
2010-03-23 01:37:12 +00:00
Ted Kremenek
bb6f5af4a4
Tweak null dereference diagnostics to give clearer diagnostics when
...
a null dereference results from a field access.
llvm-svn: 99236
2010-03-23 01:11:38 +00:00
Ted Kremenek
0b40532b5e
Only perform CFG-based warnings on 'static inline' functions that
...
are called (transitively) by regular functions/blocks within a
translation untion.
llvm-svn: 99233
2010-03-23 00:13:23 +00:00
Fariborz Jahanian
00c291b012
Set the relevent attributes declared in class extension
...
and fix a missing diagnostics on assigning to a read-only
property. Fixes radar 7766184.
llvm-svn: 99230
2010-03-22 23:25:52 +00:00
Rafael Espindola
8d04f0604e
A fixed version of r99174 which also includes a test that we emit vtables when
...
we see an specialization definition ever if we then see a extern template declaration.
llvm-svn: 99226
2010-03-22 23:12:48 +00:00
Ted Kremenek
fe449a24a8
Disable the emission of frontend warnings (not errors) under --analyze.
...
Fixes <rdar://problem/7405601>.
llvm-svn: 99222
2010-03-22 22:32:05 +00:00
Ted Kremenek
28ec56d7dd
Improve the diagnostics for the UndefinedAssignmentChecker when an
...
uninitialized value is used in the LHS of a compound assignment.
llvm-svn: 99221
2010-03-22 22:16:26 +00:00
Douglas Gregor
65f7a3f801
Comment the reasons for the strange little dance we do with the main file name for debug information
...
llvm-svn: 99215
2010-03-22 21:28:29 +00:00
Chris Lattner
12161d3d1a
(re)implement PR6542, accepting and discarding the __gcc_tdiag__
...
format attribute specifier.
llvm-svn: 99213
2010-03-22 21:08:50 +00:00
Chris Lattner
cb5a828a45
merge some tests.
...
llvm-svn: 99212
2010-03-22 21:05:15 +00:00
Chris Lattner
42ed9a6a2b
rename test
...
llvm-svn: 99211
2010-03-22 21:02:58 +00:00
Fariborz Jahanian
cf711fb353
Diagnose miuse of property dot-syntax instead of crashing.
...
(radar 7634653).
llvm-svn: 99210
2010-03-22 21:02:34 +00:00
Chris Lattner
e783d10bc0
merge two tests.
...
llvm-svn: 99209
2010-03-22 21:02:14 +00:00
Chris Lattner
bbd72654fb
rename test.
...
llvm-svn: 99208
2010-03-22 21:01:10 +00:00
Chris Lattner
817b16fc40
revert r98661, gcc_tdiag is not an attribute (PR6542).
...
Will fix correctly now that I have a testcase
llvm-svn: 99207
2010-03-22 20:59:10 +00:00
Chris Lattner
05332cad33
move a test to a more appropriate directory
...
llvm-svn: 99200
2010-03-22 20:31:04 +00:00
Anders Carlsson
290c6ed7c7
More work on thunks; almost there now.
...
llvm-svn: 99199
2010-03-22 20:06:40 +00:00
Fariborz Jahanian
a9effb55f3
Fixes access rues for ivars declared in class
...
implementations (radar 7547942).
llvm-svn: 99198
2010-03-22 19:04:14 +00:00
Chris Lattner
c57c6792ee
hopefully fix this on non-sse2 hosts. Shouldn't an apple-darwin10
...
triple imply sse2?
llvm-svn: 99197
2010-03-22 18:51:09 +00:00
Fariborz Jahanian
34f521ce9c
Test for my last patch.
...
llvm-svn: 99194
2010-03-22 18:27:27 +00:00
Fariborz Jahanian
d2ae2d0a2a
More clean up of ivars which are either in class extensions and
...
implementation or synthesized into an implementation. Also,
fixes a code gen. bug when ivars are itroduced in interleaved
implementations. (related to radar 7547942).
llvm-svn: 99193
2010-03-22 18:25:57 +00:00
Kovarththanan Rajaratnam
a6405f7a95
Sort calls to add_clang_library()
...
llvm-svn: 99191
2010-03-22 18:16:06 +00:00