summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/derived-to-base-conv.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Update all tests other than Driver/std.cpp to use -std=c++11 rather thanRichard Smith2011-10-131-2/+2
| | | | | | | -std=c++0x. Patch by Ahmed Charles! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141900 91177308-0d34-0410-b5e6-96231b3b80d8
* These tests require particular registered targets. Declared as such.Galina Kistanova2011-06-031-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132600 91177308-0d34-0410-b5e6-96231b3b80d8
* update a bunch of tests that are using the x86 backend instead of grepping IR :(Chris Lattner2010-09-221-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114535 91177308-0d34-0410-b5e6-96231b3b80d8
* Rework our handling of copy construction of temporaries, which was aDouglas Gregor2010-04-021-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | poor (and wrong) approximation of the actual rules governing when to build a copy and when it can be elided. The correct implementation is actually simpler than the approximation. When we only enumerate constructors as part of initialization (e.g., for direct initialization or when we're copying from a class type or one of its derived classes), we don't create a copy. When we enumerate all conversion functions, we do create a copy. Before, we created some extra copies and missed some others. The new test copy-initialization.cpp shows a case where we missed creating a (required, non-elidable) copy as part of a user-defined conversion, which resulted in a miscompile. This commit also fixes PR6757, where the missing copy made us reject well-formed code in the ternary operator. This commit also cleans up our handling of copy elision in the case where we create an extra copy of a temporary object, which became necessary now that we produce the right copies. The code that seeks to find the temporary object being copied has moved into Expr::getTemporaryObject(); it used to have two different not-quite-the-same implementations, one in Sema and one in CodeGen. Note that we still do not attempt to perform the named return value optimization, so we miss copy elisions for return values and throw expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100196 91177308-0d34-0410-b5e6-96231b3b80d8
* Testcase fixes to reflect instruction table changes in the LLVM backendSean Callanan2009-12-181-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | (http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20091214/092780.html) The instruction fixes were checked and approved by Chris Lattner, but these testcase fixes are mine; please yell at me if there are any problems with either. * PR5050-constructor-conversion.cpp * array-construction.cpp * constructor-conversion.cpp * cast-conversion.cpp * constructor-default-arg.cpp * derived-to-base-conv.cpp * ptr-to-member-function.cpp * call-arg-zero-temp.cpp * default-destructor-synthesis.cpp * global-array-destruction.cpp * array-operator-delete-call.cpp * decl-ref-init.cpp * default-constructor-for-members.cpp * convert-to-fptr.cpp * constructor-for-array-members.cpp * conversion-function.cpp * objc-read-weak-byref.m Fixed testcase to reflect call qualifier git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91640 91177308-0d34-0410-b5e6-96231b3b80d8
* Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.Daniel Dunbar2009-12-151-2/+2
| | | | | | | | | - 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
* Remove RUN: true lines.Daniel Dunbar2009-11-081-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86432 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate &&s in tests.Daniel Dunbar2009-11-081-4/+4
| | | | | | - 'for i in $(find . -type f); do sed -e 's#\(RUN:.*[^ ]\) *&& *$#\1#g' $i | FileUpdate $i; done', for the curious. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86430 91177308-0d34-0410-b5e6-96231b3b80d8
* Copy conversion of an expression to its base classFariborz Jahanian2009-10-191-0/+28
| | | | | | | | is a standard convesion and not a user-defined conversion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84525 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement derived-to-base AST/code gen. There is aFariborz Jahanian2009-10-161-0/+51
FIXME in CGCXX.cpp that I would like Anders to take a look at. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84265 91177308-0d34-0410-b5e6-96231b3b80d8