[cfe-commits] r131255 - /cfe/trunk/include/clang/AST/DeclCXX.h
Nick Lewycky
nicholas at mxc.ca
Thu May 12 15:11:22 PDT 2011
Author: nicholas
Date: Thu May 12 17:11:21 2011
New Revision: 131255
URL: http://llvm.org/viewvc/llvm-project?rev=131255&view=rev
Log:
Add a method to query whether or not a class has a default constructor declared.
Modified:
cfe/trunk/include/clang/AST/DeclCXX.h
Modified: cfe/trunk/include/clang/AST/DeclCXX.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DeclCXX.h?rev=131255&r1=131254&r2=131255&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/DeclCXX.h (original)
+++ cfe/trunk/include/clang/AST/DeclCXX.h Thu May 12 17:11:21 2011
@@ -437,7 +437,7 @@
bool ComputedVisibleConversions : 1;
/// \brief Whether we have a C++0x user-provided default constructor (not
- /// explicitly deleted or defaulted.
+ /// explicitly deleted or defaulted).
bool UserProvidedDefaultConstructor : 1;
/// \brief Whether we have already declared the default constructor.
@@ -684,6 +684,12 @@
!data().DeclaredDefaultConstructor;
}
+ /// hasDeclaredDefaultConstructor - Whether this class's default constructor
+ /// has been declared (either explicitly or implicitly).
+ bool hasDeclaredDefaultConstructor() const {
+ return data().DeclaredDefaultConstructor;
+ }
+
/// hasConstCopyConstructor - Determines whether this class has a
/// copy constructor that accepts a const-qualified argument.
bool hasConstCopyConstructor(const ASTContext &Context) const;
More information about the cfe-commits
mailing list