diff options
author | Anders Carlsson <andersca@mac.com> | 2009-03-25 20:19:57 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-03-25 20:19:57 +0000 |
commit | b8547e800f9553a72c2f3635ae2371692bd4411a (patch) | |
tree | 5933f610a03b2e8519f5706174cddd49ccf0bf9c | |
parent | 4927abdc2e8c630117261fd9266304290b1cf32f (diff) |
It doesn't make sense to set the access specifier to AS_none (I think)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67700 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/clang/AST/DeclBase.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/clang/AST/DeclBase.h b/include/clang/AST/DeclBase.h index abf5404882..a53b459c99 100644 --- a/include/clang/AST/DeclBase.h +++ b/include/clang/AST/DeclBase.h @@ -175,7 +175,10 @@ public: const_cast<const Decl*>(this)->getDeclContext()); } - void setAccess(AccessSpecifier AS) { Access = AS; } + void setAccess(AccessSpecifier AS) { + assert(AS != AS_none && "Can't set access to none"); + Access = AS; + } AccessSpecifier getAccess() const { return AccessSpecifier(Access); } bool hasAttrs() const { return HasAttrs; } |