diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-05-13 06:47:56 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-05-13 06:47:56 +0000 |
commit | 37b415dd0637005d5d01d75e7a55b860f7fc79d9 (patch) | |
tree | 7ccff2414d7efb6e55a0c20db1af41472279951d /include/clang/AST/DeclCXX.h | |
parent | 3d47197c64ef2e0be44f7f83e6c685077fb595a7 (diff) |
Add support for derived class special members hiding functions brought in from
a base class via a using-declaration. If a class has a using-declaration
declaring either a constructor or an assignment operator, eagerly declare its
special members in case they need to displace a shadow declaration from a
using-declaration.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@269398 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/AST/DeclCXX.h')
-rw-r--r-- | include/clang/AST/DeclCXX.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/clang/AST/DeclCXX.h b/include/clang/AST/DeclCXX.h index 8906d9c798..20aa7d1ab4 100644 --- a/include/clang/AST/DeclCXX.h +++ b/include/clang/AST/DeclCXX.h @@ -382,6 +382,14 @@ class CXXRecordDecl : public RecordDecl { /// provided default ctor also doesn't have an in-class initializer. unsigned HasUninitializedFields : 1; + /// \brief True if there are any member using-declarations that inherit + /// constructors from a base class. + unsigned HasInheritedConstructor : 1; + + /// \brief True if there are any member using-declarations named + /// 'operator='. + unsigned HasInheritedAssignment : 1; + /// \brief These flags are \c true if a defaulted corresponding special /// member can't be fully analyzed without performing overload resolution. /// @{ @@ -1308,6 +1316,18 @@ public: return data().HasNonLiteralTypeFieldsOrBases; } + /// \brief Determine whether this class has a using-declaration that names + /// a base class constructor. + bool hasInheritedConstructor() const { + return data().HasInheritedConstructor; + } + + /// \brief Determine whether this class has a using-declaration that names + /// a base class assignment operator. + bool hasInheritedAssignment() const { + return data().HasInheritedAssignment; + } + /// \brief Determine whether this class is considered trivially copyable per /// (C++11 [class]p6). bool isTriviallyCopyable() const; |