History log of /external/clang/test/SemaCXX/rval-references.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
4967a710c84587c654b56c828382219c3937dacb 20-Sep-2016 Pirama Arumuga Nainar <pirama@google.com> Update aosp/master Clang for rebase to r275480

Bug: http://b/31320715

This merges commit ac9cc4764cf47a6c3f031687d8592e080c9f5001 from
aosp/dev.

Test: Build AOSP and run RenderScript tests (host tests for slang and
libbcc, RsTest, CTS)

Change-Id: Ic2875e5c3673c83448cd7d1013861e42947b1b55
/external/clang/test/SemaCXX/rval-references.cpp
87d948ecccffea9e9e37d0d053b246e2d6d6c47b 04-Mar-2016 Pirama Arumuga Nainar <pirama@google.com> Update aosp/master clang for rebase to r256229

http://b/26987366

Change-Id: I5d349c9843ea5c24d6e455956f8a446393b6873d
/external/clang/test/SemaCXX/rval-references.cpp
762bb9d0ad20320b9f97a841dce57ba5e8e48b07 14-Oct-2011 Richard Smith <richard-llvm@metafoo.co.uk> Update all tests other than Driver/std.cpp to use -std=c++11 rather than
-std=c++0x. Patch by Ahmed Charles!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141900 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/rval-references.cpp
8ed3adec26af254dd6df6b34546737045f353670 27-Sep-2011 Eli Friedman <eli.friedman@gmail.com> Move test, so it actually tests what it is supposed to (given that we don't have an AST verifier).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140620 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/rval-references.cpp
104be6fc8de206c9b79b241b36ebaf9407b3be08 27-Sep-2011 Eli Friedman <eli.friedman@gmail.com> PR11009: Fix a FIXME which was leading to an assertion failure with rvalue references.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140594 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/rval-references.cpp
abea951c34876a5374d0e3678c7989b225c5c895 28-Feb-2011 Anders Carlsson <andersca@mac.com> Add -fcxx-exceptions to all tests that use C++ exceptions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126599 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/rval-references.cpp
e41721e7dfabcc15cb50be9075a4153f1ad648ea 19-Feb-2011 Anders Carlsson <andersca@mac.com> Pass -fexceptions to all tests that use try/catch/throw.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126037 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/rval-references.cpp
fb5d7efc279335bde2cdc0a73da525d6b28201e9 21-Jan-2011 Douglas Gregor <dgregor@apple.com> Improve the diagnostic that complains about binding an rvalue
reference to an lvalue.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123953 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/rval-references.cpp
b2855ad68d93824faf47c09bbef90ba74157f0f4 21-Jan-2011 Douglas Gregor <dgregor@apple.com> More work to bring reference binding up to the latest C++0x
specification. In particular, an rvalue reference can bind to an
initializer expression that is an lvalue if the referent type and the
initializer expression type are not reference-related. This is a newer
formulation to the previous "rvalue references can never bind to
lvalues" rule.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123952 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/rval-references.cpp
26e10bea3d2e9d2979194890e51b98ecea165a96 30-Nov-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Follow through references to catch returned stack addresses, local blocks, label addresses or references to temporaries, e.g:

const int& g2() {
int s1;
int &s2 = s1; // expected-note {{binding reference variable 's2' here}}
return s2; // expected-warning {{reference to stack memory associated with local variable 's1' returned}}
}

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120483 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/rval-references.cpp
d976ca4fcacdd965446bcfbe8cb03b4ee67cd827 30-Nov-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Revert r120331 since it causes spurious warnings and a possible assertion hit when self-host.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120351 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/rval-references.cpp
8b2f01b56209f4bb7331292225c5300753880044 29-Nov-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Emit warnings if we are returning a reference to a local temporary.
The issue was brought to our attention by Matthieu Monrocq.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120331 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/rval-references.cpp
4680bf233caeebe89aa297eb5a25709dd15a4b11 30-Jun-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Make both old and new versions of reference binding use the new classification functions, and updated them for N3092.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107301 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/rval-references.cpp
7c2342dd4c9947806842e5aca3d2bb2e542853c9 10-Mar-2010 John McCall <rjmccall@apple.com> When pretty-printing tag types, only print the tag if we're in C (and
therefore not creating ElaboratedTypes, which are still pretty-printed
with the written tag).

Most of these testcase changes were done by script, so don't feel too
sorry for my fingers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98149 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/rval-references.cpp
81201626aa08bcc9d05c8b3c6a1d38a7d577c3ce 08-Jan-2010 John McCall <rjmccall@apple.com> Change the printing of OR_Deleted overload results to print all the candidates,
not just the viable ones. This is reasonable because the most common use of
deleted functions is to exclude some implicit conversion during calls; users
therefore will want to figure out why some other options were excluded.

Started sorting overload results. Right now it just sorts by location in the
translation unit (after putting viable functions first), but we can do better than
that.

Changed bool OnlyViable parameter to PrintOverloadCandidates to an enum for better
self-documentation.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92990 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/rval-references.cpp
b1622a1fd7b7f4ab8d00d0183d17c90ad25c14e3 06-Jan-2010 John McCall <rjmccall@apple.com> Improve the diagnostics used to report implicitly-generated class members
as parts of overload sets. Also, refer to constructors as 'constructors'
rather than functions.

Adjust a lot of tests.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92832 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/rval-references.cpp
18ef5e28a9a2677f8b1dce1fb2638d66e0a1621f 18-Dec-2009 Douglas Gregor <dgregor@apple.com> Switch the initialization required by return statements over to the
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.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91669 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/rval-references.cpp
a5728872c7702ddd09537c95bc3cbd20e1f2fb09 15-Dec-2009 Daniel Dunbar <daniel@zuster.org> 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).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91446 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/rval-references.cpp
20093b4bf698f292c664676987541d5103b65b15 10-Dec-2009 Douglas Gregor <dgregor@apple.com> Reimplement reference initialization (C++ [dcl.init.ref]) using the
new notion of an "initialization sequence", which encapsulates the
computation of the initialization sequence along with diagnostic
information and the capability to turn the computed sequence into an
expression. At present, I've only switched one CheckReferenceInit
callers over to this new mechanism; more will follow.

Aside from (hopefully) being much more true to the standard, the
diagnostics provided by this reference-initialization code are a bit
better than before. Some examples:

p5-var.cpp:54:12: error: non-const lvalue reference to type 'struct
Derived'
cannot bind to a value of unrelated type 'struct Base'
Derived &dr2 = b; // expected-error{{non-const lvalue reference to
...
^ ~
p5-var.cpp:55:9: error: binding of reference to type 'struct Base' to
a value of
type 'struct Base const' drops qualifiers
Base &br3 = bc; // expected-error{{drops qualifiers}}
^ ~~

p5-var.cpp:57:15: error: ambiguous conversion from derived class
'struct Diamond' to base class 'struct Base':
struct Diamond -> struct Derived -> struct Base
struct Diamond -> struct Derived2 -> struct Base
Base &br5 = diamond; // expected-error{{ambiguous conversion from
...
^~~~~~~
p5-var.cpp:59:9: error: non-const lvalue reference to type 'long'
cannot bind to
a value of unrelated type 'int'
long &lr = i; // expected-error{{non-const lvalue reference to type
...
^ ~

p5-var.cpp:74:9: error: non-const lvalue reference to type 'struct
Base' cannot
bind to a temporary of type 'struct Base'
Base &br1 = Base(); // expected-error{{non-const lvalue reference to
...
^ ~~~~~~

p5-var.cpp:102:9: error: non-const reference cannot bind to bit-field
'i'
int & ir1 = (ib.i); // expected-error{{non-const reference cannot
...
^ ~~~~~~
p5-var.cpp:98:7: note: bit-field is declared here
int i : 17; // expected-note{{bit-field is declared here}}
^






git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90992 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/rval-references.cpp
cc5306ac8a39cdd5e7f83e597cba911e97c4a595 18-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> Improve on diagnosing type mismatches because of
lack of viable convesion functions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89216 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/rval-references.cpp
e2b6833d445c7a4ce64f1816c05f176ba1740aca 12-Apr-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Parse deleted member functions. Parsing member declarations goes through a different code path that I forgot previously.
Implement the rvalue reference overload dance for returning local objects. Returning a local object first tries to find a move constructor now.
The error message when no move constructor is defined (or is not applicable) and the copy constructor is deleted is quite ugly, though.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68902 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/rval-references.cpp
a98458054d9004ad414a8518057f8ce08f23ae70 29-Mar-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Reintroduce r67870 (rval ref overloading), since I can't reproduce any test failures on i386 or x86_64. If this fails for someone, please contact me.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67999 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/rval-references.cpp
14734f7d2a69f9076e8a06954f06d3313063e7f9 28-Mar-2009 Anders Carlsson <andersca@mac.com> Revert Sebastian's rvalue patch (r67870) since it caused test failures in

SemaCXX//overload-member-call.cpp
SemaCXX//overloaded-operator.cpp
SemaTemplate//instantiate-method.cpp



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67912 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/rval-references.cpp
f8738782e3322923501c8c185b152f0553a37463 27-Mar-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Better overload resolution for rvalue references.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67870 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/rval-references.cpp
d7d5f0223bd30dfd618762349c6209dd1d5ea3e6 24-Mar-2009 Daniel Dunbar <daniel@zuster.org> Rename clang to clang-cc.

Tests and drivers updated, still need to shuffle dirs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67602 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/rval-references.cpp
f2e21e5ad5e816d88e048c89dc775a9d4547c089 23-Mar-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Disallow catching exceptions by rvalue reference.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67492 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/rval-references.cpp
157be839ade8312389b20d02a3d470c0487fd756 22-Mar-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Implement static_cast from lvalue to rvalue reference.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67487 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/rval-references.cpp
2ff44784d180bb96953c22de4a0b2efb5d50263a 20-Mar-2009 Douglas Gregor <dgregor@apple.com> Some minor tweaks and additional tests for rvalue references

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67397 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/rval-references.cpp
7c80bd64032e610c0dbd74fc0ef6ea334447f2fd 17-Mar-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Almost complete implementation of rvalue references. One bug, and a few unclear areas. Maybe Doug can shed some light on some of the fixmes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67059 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/rval-references.cpp