History log of /external/clang/test/SemaCXX/default-assignment-operator.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
6698be8a6930730df5e61c941197e72682196187 13-Jun-2013 Richard Smith <richard-llvm@metafoo.co.uk> Fix some confusing diagnostic wording. s/implicit default/implicit/ if we're
not actually talking about a default constructor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183885 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/default-assignment-operator.cpp
c63d2c8469d6b96712b324f76b4af07e1852313f 12-May-2010 Douglas Gregor <dgregor@apple.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
380c2139959d8608782292984b457640a143a70d 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
bbbe074566a8defed299ff676bc65b3631861768 11-May-2010 Douglas Gregor <dgregor@apple.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
60a8fbb4242e2535ccddd1fa2d8257ec1bf749c2 06-May-2010 Douglas Gregor <dgregor@apple.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
6cdc161527a513f28dfc6f6ec27eb287f8268024 04-May-2010 Douglas Gregor <dgregor@apple.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
06a9f3680d22529a2fcf20c52d71cf221d99d910 01-May-2010 Douglas Gregor <dgregor@apple.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
d1aa800a19c956c72319025dd302ae78ed47f9ee 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
325e593a83b20d9bce3628aa78fda983b554814e 15-Apr-2010 Douglas Gregor <dgregor@apple.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
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/default-assignment-operator.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/default-assignment-operator.cpp
b6cc91be4da4f55c7e3dca87ecfdb532b33c83ca 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
1eb4433ac451dc16f4133a88af2d002ac26c58ef 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
5e09d4c96dc2846cc1fc75f80f5632612247354b 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
a1fbe8611694835a647811b97e56ec62d504110a 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