]> granicus.if.org Git - clang/commit
PR13051: If a constructor is explicitly defaulted, it isn't marked as being
authorRichard Smith <richard-llvm@metafoo.co.uk>
Fri, 8 Jun 2012 21:09:22 +0000 (21:09 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Fri, 8 Jun 2012 21:09:22 +0000 (21:09 +0000)
commit3f5f558a4ca08fe952cbbdf69b87487163c9a719
treef7007a6a594b2e9b1a7e63fb307241464b5ea955
parenta248e9c1dd56af68aba419e9717d369c5e61210a
PR13051: If a constructor is explicitly defaulted, it isn't marked as being
constexpr until we get to the end of the class definition. When that happens,
be sure to remember that the class actually does have a constexpr constructor.

This is a stopgap solution, which still doesn't cover the case of a class with
multiple copy constructors (only some of which are constexpr). We should be
performing constructor lookup when implicitly defining a constructor in order
to determine whether all constructors it invokes are constexpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158228 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/AST/Decl.h
include/clang/AST/DeclCXX.h
lib/AST/Decl.cpp
lib/AST/DeclCXX.cpp
test/CXX/special/class.copy/p13-0x.cpp
test/CXX/special/class.copy/p8-cxx11.cpp