summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/temporaries.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* When binding an lvalue to a reference, we always need to pop temporaries.Anders Carlsson2010-02-041-0/+21
| | | | | | | | | | | | | With this fix, and the other fixes committed today a make check-all with a clang-built LLVM now gives: Expected Passes : 6933 Expected Failures : 46 Unsupported Tests : 40 Unexpected Failures: 27 which means that we pass 99.96% of all tests :) The resulting 27 tests are all LLVMC tests and seem to be because of differences in the clang and gcc drivers. llvm-svn: 95313
* Check in a test case and a nasty workaround for PR6199.Anders Carlsson2010-02-021-0/+18
| | | | llvm-svn: 95076
* When transforming CXXExprWithTemporaries and CXXBindTemporaryExprDouglas Gregor2009-12-241-0/+14
| | | | | | | | | expressions (e.g., for template instantiation), just transform the subexpressions and return those, since the temporary-related nodes will be implicitly regenerated. Fixes PR5867, but I said that before... llvm-svn: 92135
* InitializationSequence handles binding to temporaries, so thatDouglas Gregor2009-12-241-0/+19
| | | | | | | | argument-passing doesn't have to. Fixes PR5867, where we were binding a temporary twice in the AST and, therefore, calling its destructor twice. llvm-svn: 92131
* Switch the initialization required by return statements over to theDouglas Gregor2009-12-181-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | new InitializationSequence. This fixes some bugs (e.g., PR5808), changed some diagnostics, and caused more churn than expected. What's new: - InitializationSequence now has a "C conversion sequence" category and step kind, which falls back to - Changed the diagnostics for returns to always have the result type of the function first and the type of the expression second. CheckSingleAssignmentConstraints to peform checking in C. - Improved ASTs for initialization of return values. The ASTs now capture all of the temporaries we need to create, but intentionally do not bind the tempoary that is actually returned, so that it won't get destroyed twice. - Make sure to perform an (elidable!) copy of the class object that is returned from a class. - Fix copy elision in CodeGen to properly see through the subexpressions that occur with elidable copies. - Give "new" its own entity kind; as with return values and thrown objects, we don't bind the expression so we don't call a destructor for it. Note that, with this patch, I've broken returning move-only types in C++0x. We'll fix it later, when we tackle NRVO. llvm-svn: 91669
* 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
* Don't bind arguments to temporaries if the argument has a reference type.Anders Carlsson2009-11-131-0/+14
| | | | llvm-svn: 88662
* Fix two bugs with temporaries:Anders Carlsson2009-11-131-0/+23
| | | | | | | | | | | | | | | | | | | | | | 1. For A f() { return A(); } we were incorrectly calling the A destructor on the returned object. 2. For void f(A); void g() { A a; f(a); } we were incorrectly not calling the copy constructor. llvm-svn: 87082
* If a member variable of reference type is bound to a temporary in its member ↵Anders Carlsson2009-11-061-0/+17
| | | | | | initializer it needs to be destroyed at the end of the constructor. llvm-svn: 86230
* If a member initializer create temporaries we need to destroy them. Fixes ↵Anders Carlsson2009-11-061-0/+33
| | | | | | PR5077. llvm-svn: 86225
* Add missing colons for FileCheck.Benjamin Kramer2009-10-311-3/+3
| | | | llvm-svn: 85683
* When building a cast argument, make sure to bind the result to a temporary.Anders Carlsson2009-10-181-0/+22
| | | | llvm-svn: 84448
* Convert temporaries.cpp to using FileCheck.Anders Carlsson2009-10-181-13/+25
| | | | llvm-svn: 84446
* Rename temp-1.cpp to temporaries.cpp.Anders Carlsson2009-10-181-0/+83
llvm-svn: 84443
OpenPOWER on IntegriCloud