Commit Graph

11 Commits

Author SHA1 Message Date
John McCall 00f1a67ad3 Fix test for no-asserts builds.
llvm-svn: 114185
2010-09-17 17:03:41 +00:00
John McCall 769250ea70 Currently we're initializing the vtable pointers of a class only after
the bases are completely initialized.  This won't work --- base
initializer expressions can rely on the vtables having been set up.
Check for uses of 'this' in the initializers and force a vtable
initialization if found.

This might not be good enough;  we might need to extend this to handle
the possibility of arbitrary code finding an external reference to this
(not yet completely-constructed!) object and accessing through it,
in which case we'll probably find ourselves doing a lot more unnecessary
stores.

llvm-svn: 114153
2010-09-17 02:31:44 +00:00
Douglas Gregor c14922f14a When adding initializers to a constructor, be sure that we are looking
through the bases and fields of the definition of the class in which
the constructor is declared, rather than some other declaration of
that class.

llvm-svn: 99661
2010-03-26 22:43:07 +00:00
Douglas Gregor a4b592a7d5 Switch more of Sema::CheckInitializerTypes over to
InitializationSequence. Specially, switch initialization of a C++
class type (either copy- or direct-initialization). 

Also, make sure that we create an elidable copy-construction when
performing copy initialization of a C++ class variable. Fixes PR5826.

llvm-svn: 91750
2009-12-19 03:01:41 +00:00
Daniel Dunbar 8fbe78f6fc Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.
- This is designed to make it obvious that %clang_cc1 is a "test variable"
   which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it
   can be useful to redefine what gets run as 'clang -cc1' (for example, to set
   a default target).

llvm-svn: 91446
2009-12-15 20:14:24 +00:00
Mike Stump 11289f4280 Remove tabs, and whitespace cleanups.
llvm-svn: 81346
2009-09-09 15:08:12 +00:00
Fariborz Jahanian 7481bd88bb Array member construction in prologue of user-declared
constructors.

llvm-svn: 79640
2009-08-21 17:09:38 +00:00
Fariborz Jahanian bb67b827d9 Patch to provide cast of objects in member access
excpression, if needed, and remove some ir-gen code
now unnencessary.

llvm-svn: 77490
2009-07-29 18:40:24 +00:00
Fariborz Jahanian a399dfae19 More cleanup of data member access and then some.
llvm-svn: 77351
2009-07-28 18:54:57 +00:00
Fariborz Jahanian 5142fbd02e More work toward data member access ir-gen.
llvm-svn: 77332
2009-07-28 17:38:28 +00:00
Fariborz Jahanian dedf1e4b1a ir-gen for non-virtual base class initialization
in constructors.

llvm-svn: 77087
2009-07-25 21:12:28 +00:00