diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2011-05-12 22:11:21 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2011-05-12 22:11:21 +0000 |
commit | 2ce1630c9261c93d67001c993950ff4aa35bb6b9 (patch) | |
tree | c2bbb750a7b91f48cadedb8332e773ecd6aafe33 | |
parent | cadf7c57ade774fc6f320cd383ee5742051cc6cf (diff) | |
download | bcm5719-llvm-2ce1630c9261c93d67001c993950ff4aa35bb6b9.tar.gz bcm5719-llvm-2ce1630c9261c93d67001c993950ff4aa35bb6b9.zip |
Add a method to query whether or not a class has a default constructor declared.
llvm-svn: 131255
-rw-r--r-- | clang/include/clang/AST/DeclCXX.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/clang/include/clang/AST/DeclCXX.h b/clang/include/clang/AST/DeclCXX.h index 47308b4ccde..b193b9a18ee 100644 --- a/clang/include/clang/AST/DeclCXX.h +++ b/clang/include/clang/AST/DeclCXX.h @@ -437,7 +437,7 @@ class CXXRecordDecl : public RecordDecl { 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 @@ public: !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; |