summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/derived-to-base-conv.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Revert "[CodeGenCXX] Treat 'this' as noalias in constructors"Sean Fertile2018-10-151-1/+1
| | | | | | | This reverts commit https://reviews.llvm.org/rL344150 which causes MachineOutliner related failures on the ppc64le multistage buildbot. llvm-svn: 344526
* [CodeGenCXX] Treat 'this' as noalias in constructorsAnton Bikineev2018-10-101-1/+1
| | | | | | | | | This is currently a clang extension and a resolution of the defect report in the C++ Standard. Differential Revision: https://reviews.llvm.org/D46441 llvm-svn: 344150
* Update Clang tests to handle explicitly typed load changes in LLVM.David Blaikie2015-02-271-1/+1
| | | | llvm-svn: 230795
* Mark C++ reference parameters as dereferenceableHal Finkel2014-07-181-2/+2
| | | | | | | | | | | | | | Because references must be initialized using some evaluated expression, they must point to something, and a callee can assume the reference parameter is dereferenceable. Taking advantage of a new attribute just added to LLVM, mark them as such. Because dereferenceability in addrspace(0) implies nonnull in the backend, we don't need both attributes. However, we need to know the size of the object to use the dereferenceable attribute, so for incomplete types we still emit only nonnull. llvm-svn: 213386
* Add 'nonnull' parameter or return attribute when producing an llvm pointer ↵Nick Lewycky2014-05-281-2/+2
| | | | | | type in a function type where the C++ type is a reference. Update the tests. llvm-svn: 209723
* CHECK-LABEL-ify some code gen tests to improve diagnostic experience when ↵Stephen Lin2013-08-151-3/+3
| | | | | | tests fail. llvm-svn: 188447
* When devirtualizing the conversion to a virtual base subobject,John McCall2012-08-011-55/+56
| | | | | | | | | | | don't explode if the offset we get is zero. This can happen if you have an empty virtual base class. While I'm at it, remove an unnecessary block from the IR-generation of the null-check, mark the eventual GEP as inbounds, and generally prettify. llvm-svn: 161100
* 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! llvm-svn: 141900
* These tests require particular registered targets. Declared as such.Galina Kistanova2011-06-031-0/+1
| | | | llvm-svn: 132600
* update a bunch of tests that are using the x86 backend instead of grepping IR :(Chris Lattner2010-09-221-2/+2
| | | | llvm-svn: 114535
* 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. llvm-svn: 100196
* 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 llvm-svn: 91640
* 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). llvm-svn: 91446
* Remove RUN: true lines.Daniel Dunbar2009-11-081-1/+0
| | | | llvm-svn: 86432
* 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. llvm-svn: 86430
* Copy conversion of an expression to its base classFariborz Jahanian2009-10-191-0/+28
| | | | | | | is a standard convesion and not a user-defined conversion. llvm-svn: 84525
* 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. llvm-svn: 84265
OpenPOWER on IntegriCloud