]> granicus.if.org Git - clang/commit
When performing a trivial copy of a C++ type, we must be careful not
authorJohn McCall <rjmccall@apple.com>
Tue, 21 Aug 2012 04:10:00 +0000 (04:10 +0000)
committerJohn McCall <rjmccall@apple.com>
Tue, 21 Aug 2012 04:10:00 +0000 (04:10 +0000)
commit929bbfb0b69165b55da3c56abf22aa10e20dadc6
tree3ef079c0dbd094349bc721d47a330a946272cdd0
parentdb309ae1bfa7c30ed3b2b9e59a316b8fef2e56b6
When performing a trivial copy of a C++ type, we must be careful not
to overwrite objects that might have been allocated into the type's
tail padding.  This patch is missing some potential optimizations where
the destination is provably a complete object, but it's necessary for
correctness.

Patch by Jonathan Sauer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162254 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/AST/ASTContext.h
lib/AST/ASTContext.cpp
lib/CodeGen/CGExprAgg.cpp
test/CodeGenObjCXX/implicit-copy-assign-operator.mm