Make these functions more clearly express the test they are performing. No functional...
authorRichard Smith <richard-llvm@metafoo.co.uk>
Sat, 1 Dec 2012 03:15:03 +0000 (03:15 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Sat, 1 Dec 2012 03:15:03 +0000 (03:15 +0000)
llvm-svn: 169077

clang/include/clang/AST/DeclCXX.h

index afa9498..0a8e8ff 100644 (file)
@@ -1033,7 +1033,7 @@ public:
   /// other than the copy or move constructors.
   bool hasConstexprNonCopyMoveConstructor() const {
     return data().HasConstexprNonCopyMoveConstructor ||
-           (!hasUserDeclaredConstructor() &&
+           (needsImplicitDefaultConstructor() &&
             defaultedDefaultConstructorIsConstexpr());
   }
 
@@ -1047,7 +1047,7 @@ public:
   /// \brief Determine whether this class has a constexpr default constructor.
   bool hasConstexprDefaultConstructor() const {
     return data().HasConstexprDefaultConstructor ||
-           (!data().UserDeclaredConstructor &&
+           (needsImplicitDefaultConstructor() &&
             defaultedDefaultConstructorIsConstexpr());
   }