diff options
author | John McCall <rjmccall@apple.com> | 2010-01-23 00:46:32 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-01-23 00:46:32 +0000 |
commit | 92f883177b162928a8e632e4e3b93fafd2b26072 (patch) | |
tree | d276d1c8a80776fc675c0f7cab636c41458a4bc2 /include/clang/AST/CXXInheritance.h | |
parent | 336fd81e04c01ffbce2825b372aeb127c80d4d97 (diff) |
Implement elementary access control.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94268 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/AST/CXXInheritance.h')
-rw-r--r-- | include/clang/AST/CXXInheritance.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/include/clang/AST/CXXInheritance.h b/include/clang/AST/CXXInheritance.h index 77356f2f4d..1491b1edbb 100644 --- a/include/clang/AST/CXXInheritance.h +++ b/include/clang/AST/CXXInheritance.h @@ -65,12 +65,21 @@ struct CXXBasePathElement { /// subobject is being used. class CXXBasePath : public llvm::SmallVector<CXXBasePathElement, 4> { public: - /// \brief The access along this inheritance path. + CXXBasePath() : Access(AS_public) {} + + /// \brief The access along this inheritance path. This is only + /// calculated when recording paths. AS_none is a special value + /// used to indicate a path which permits no legal access. AccessSpecifier Access; /// \brief The set of declarations found inside this base class /// subobject. DeclContext::lookup_result Decls; + + void clear() { + llvm::SmallVectorImpl<CXXBasePathElement>::clear(); + Access = AS_public; + } }; /// BasePaths - Represents the set of paths from a derived class to @@ -138,10 +147,6 @@ class CXXBasePaths { /// to help build the set of paths. CXXBasePath ScratchPath; - /// ScratchAccess - A stack of accessibility annotations used by - /// Sema::lookupInBases. - llvm::SmallVector<AccessSpecifier, 4> ScratchAccess; - /// DetectedVirtual - The base class that is virtual. const RecordType *DetectedVirtual; |