aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGenCXX/anonymous-union-member-initializer.cpp
AgeCommit message (Collapse)Author
2012-08-08Fix an assertion failure with a C++ constructor initializing aEli Friedman
member of reference type in an anonymous struct. PR13154. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161473 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-10Rewrite default initialization of anonymous structs/unions within aDouglas Gregor
constructor. Previously, we did some bogus recursion into the fields of anonymous structs (recursively), which ended up building invalid ASTs that would cause CodeGen to crash due to invalid GEPs. Now, we instead build the default initializations based on the indirect field declarations at the top level, which properly generates the sequence of GEPs needed to initialize the proper member. Fixes PR10512 and <rdar://problem/9924046>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137212 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-13Eliminate an incomplete/incorrect attempt to provide support for C++0xDouglas Gregor
unrestricted unions, which ended up attempting to initialize objects in a union (which CodeGen isn't prepared for). Fixes PR9683. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135027 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-10relax this test a bit to hopefully work with VC++Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134870 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-10keep track of whether being in a RS_StructPointer stateChris Lattner
caused us to skip layout out a function accurately. If so, flush the type cache for both the function and struct case to ensure that any pointers to the functions get recomputed. This is overconservative, but with this patch clang can build itself again. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134863 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-10Fix the clang bootstrap and Jay's testcase from llvm-dev by being completelyChris Lattner
conservative when converting a functiontype to IR when in a "pointer within a struct" context. This has the unfortunate sideeffect of compiling all function pointers inside of structs into "{}*" which, though correct, is ugly. This has the positive side effect of being correct, and it is pretty straight-forward to improve on this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134861 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-12Formatting.John McCall
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129336 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-26Pretty up the emission of field l-values and use volatile and TBAA whenJohn McCall
loading references as part of that. Use 'char' TBAA when accessing (immediate!) fields of a may_alias struct; fixes PR9307. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126540 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-31Amazing that there are still issues with the fields of anonymous struct/unions..Argyrios Kyrtzidis
Allow taking the address of such a field for a pointer-to-member constant. Fixes rdar://8818236. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124575 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-31Fix test that didn't actually test what it wanted to test.Argyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124574 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-09Fix PR8760: IndirectFieldDecl Type was not updated during template ↵Francois Pichet
instantiation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121363 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-16Fix initialization for members of anonymous struct in a union.Argyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111159 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-21When emitting an lvalue for an anonymous struct or union member duringJohn McCall
class initialization, drill down through an arbitrary number of anonymous records. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104310 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-20Be sure to apply initializers to members of anonymous structs and unionsJohn McCall
recursively, e.g. so that members of anonymous unions inside anonymous structs still get initialized. Also generate default constructor calls for anonymous struct members when necessary. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104292 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-03When a class contains a non-empty anonymous union or struct, mark isDouglas Gregor
as non-empty. Fixes PR7021. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102913 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-15Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.Daniel Dunbar
- 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). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91446 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-02Fix an assertion when initializing a union using a member initializer. (We ↵Anders Carlsson
weren't casting from the union type to the initializer type correctly). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80837 91177308-0d34-0410-b5e6-96231b3b80d8