History log of /external/clang/test/SemaCXX/default-assignment-operator.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
03a5c472b71b24f35ffb0c5cd346794d54eaeb35 12-May-2010 Douglas Gregor <doug.gregor@gmail.com> When we emit an error during the implicit definition of a special
member function (default constructor, copy constructor, copy
assignment operator, destructor), emit a note showing where that
implicit definition was required.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103619 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/default-assignment-operator.cpp
852f9e19378c38b1cd8c325586d71979307c6c16 11-May-2010 Daniel Dunbar <daniel@zuster.org> Speculatively revert r103497, "Do not mark the virtual members of an
implicitly-instantiated class as ...", which seems to have broken bootstrap.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103515 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/default-assignment-operator.cpp
701607b7c6a01afe6d529f593ba72173bcaa5a1c 11-May-2010 Douglas Gregor <doug.gregor@gmail.com> Do not mark the virtual members of an implicitly-instantiated class as
referenced unless we see one of them defined (or the key function
defined, if it as one) or if we need the vtable for something. Fixes
PR7114.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103497 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/default-assignment-operator.cpp
a40fff7d516495febf9f69314074d15e6386b136 06-May-2010 Douglas Gregor <doug.gregor@gmail.com> When implicit definition of the copy-assignment operator fails,
provide a note that shows where the copy-assignment operator was
needed. We used to have this, but I broke it during refactoring.

Finishes PR6999.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103127 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/default-assignment-operator.cpp
34381083e2621df53741e829d718f898cebb9fed 04-May-2010 Douglas Gregor <doug.gregor@gmail.com> When creating a call to a base subobject's operator= in an
implicitly-defined copy assignment operator, suppress the protected
access check. This eliminates the remaining failure in the
Boost.SmartPtr library (that was a product of the copy-assignment
generation rewrite) and, presumably, the Boost.TR1 library as well.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103010 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/default-assignment-operator.cpp
82ffffd44d4de0ccb064b855cbcbe7916a693393 01-May-2010 Douglas Gregor <doug.gregor@gmail.com> Complete reimplementation of the synthesis for implicitly-defined copy
assignment operators.

Previously, Sema provided type-checking and template instantiation for
copy assignment operators, then CodeGen would synthesize the actual
body of the copy constructor. Unfortunately, the two were not in sync,
and CodeGen might pick a copy-assignment operator that is different
from what Sema chose, leading to strange failures, e.g., link-time
failures when CodeGen called a copy-assignment operator that was not
instantiation, run-time failures when copy-assignment operators were
overloaded for const/non-const references and the wrong one was
picked, and run-time failures when by-value copy-assignment operators
did not have their arguments properly copy-initialized.

This implementation synthesizes the implicitly-defined copy assignment
operator bodies in Sema, so that the resulting ASTs encode exactly
what CodeGen needs to do; there is no longer any special code in
CodeGen to synthesize copy-assignment operators. The synthesis of the
body is relatively simple, and we generate one of three different
kinds of copy statements for each base or member:

- For a class subobject, call the appropriate copy-assignment
operator, after overload resolution has determined what that is.
- For an array of scalar types or an array of class types that have
trivial copy assignment operators, construct a call to
__builtin_memcpy.
- For an array of class types with non-trivial copy assignment
operators, synthesize a (possibly nested!) for loop whose inner
statement calls the copy constructor.
- For a scalar type, use built-in assignment.

This patch fixes at least a few tests cases in Boost.Spirit that were
failing because CodeGen picked the wrong copy-assignment operator
(leading to link-time failures), and I suspect a number of undiagnosed
problems will also go away with this change.

Some of the diagnostics we had previously have gotten worse with this
change, since we're going through generic code for our
type-checking. I will improve this in a subsequent patch.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102853 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/default-assignment-operator.cpp
a19f6bd327360b1ca2d540071ea28acfa1da746d 23-Apr-2010 Anders Carlsson <andersca@mac.com> Change the 'declared at' diagnostic to say 'declared here'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102163 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/default-assignment-operator.cpp
9ba6661319b4b1fa03b8a7d09597f70effa37a4f 15-Apr-2010 Douglas Gregor <doug.gregor@gmail.com> Warn about non-aggregate classes with no user-declared constructors
that have reference or const scalar members, since those members can
never be initializer or modified. Fixes <rdar://problem/7804350>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101316 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/default-assignment-operator.cpp
98624359b74071fdf2575b5b1afb5d3a3a86b4a3 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/default-assignment-operator.cpp
3573b2c84372d9484296fa658f5276f6c09acb92 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/default-assignment-operator.cpp
724a5099b0e3ffb3913e3c36d1c0282d9985eeda 09-Dec-2009 Anders Carlsson <andersca@mac.com> Pass the current SourceLocation to getAssignOperatorMethod, fixing a crash when the assign operator method needs to be instantiated. Doug, please review the updated default-assignment-operator.cpp change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90935 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/default-assignment-operator.cpp
25cf760b54d3b88633827501013bc51a29b28aba 09-Sep-2009 Mike Stump <mrs@apple.com> Remove tabs, and whitespace cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81346 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/default-assignment-operator.cpp
1c0c52cb8019f7d0b4ba3e190593e24a5bc60533 09-Jul-2009 Anders Carlsson <andersca@mac.com> Use getDeclName in DefineImplicitOverloadedAssign as well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75152 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/default-assignment-operator.cpp
5a1bc7b754e0c559d59f7e1d947d0d5eb6f705e3 26-Jun-2009 Fariborz Jahanian <fjahanian@apple.com> Test case for my last patch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74216 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/default-assignment-operator.cpp