]> granicus.if.org Git - clang/commit
Properly compute triviality for explicitly-defaulted or deleted special members.
authorRichard Smith <richard-llvm@metafoo.co.uk>
Sat, 8 Dec 2012 02:53:02 +0000 (02:53 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Sat, 8 Dec 2012 02:53:02 +0000 (02:53 +0000)
commitac71351acdefc9de0c770c1d717e621ac9e684bf
treeb6c1a4193072a159a10d6b6bc583a1aeba65ef90
parent5f5250b140544436eb3c2fbd9f43e14019ef01f2
Properly compute triviality for explicitly-defaulted or deleted special members.
Remove pre-standard restriction on explicitly-defaulted copy constructors with
'incorrect' parameter types, and instead just make those special members
non-trivial as the standard requires.

This required making CXXRecordDecl correctly handle classes which have both a
trivial and a non-trivial special member of the same kind.

This also fixes PR13217 by reimplementing DiagnoseNontrivial in terms of the
new triviality computation technology.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169667 91177308-0d34-0410-b5e6-96231b3b80d8
21 files changed:
include/clang/AST/Decl.h
include/clang/AST/DeclCXX.h
include/clang/Basic/DiagnosticSemaKinds.td
include/clang/Sema/Sema.h
lib/AST/Decl.cpp
lib/AST/DeclCXX.cpp
lib/Sema/SemaDecl.cpp
lib/Sema/SemaDeclCXX.cpp
lib/Sema/SemaExprCXX.cpp
lib/Sema/SemaTemplateInstantiateDecl.cpp
lib/Sema/SemaType.cpp
test/CXX/basic/basic.types/p10.cpp
test/CXX/class/class.union/p1.cpp
test/CXX/dcl.decl/dcl.fct.def/dcl.fct.def.default/p1.cpp
test/CXX/dcl.decl/dcl.meaning/dcl.fct/dcl.fct.def.default/p2.cpp
test/CXX/special/class.copy/p12-0x.cpp [new file with mode: 0644]
test/CXX/special/class.copy/p25-0x.cpp [new file with mode: 0644]
test/CXX/special/class.ctor/p5-0x.cpp
test/SemaCXX/anonymous-struct.cpp
test/SemaCXX/cxx0x-cursory-default-delete.cpp
test/SemaCXX/cxx98-compat.cpp