[cfe-commits] r67700 - /cfe/trunk/include/clang/AST/DeclBase.h

Anders Carlsson andersca at mac.com
Wed Mar 25 13:19:57 PDT 2009


Author: andersca
Date: Wed Mar 25 15:19:57 2009
New Revision: 67700

URL: http://llvm.org/viewvc/llvm-project?rev=67700&view=rev
Log:
It doesn't make sense to set the access specifier to AS_none (I think)

Modified:
    cfe/trunk/include/clang/AST/DeclBase.h

Modified: cfe/trunk/include/clang/AST/DeclBase.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DeclBase.h?rev=67700&r1=67699&r2=67700&view=diff

==============================================================================
--- cfe/trunk/include/clang/AST/DeclBase.h (original)
+++ cfe/trunk/include/clang/AST/DeclBase.h Wed Mar 25 15:19:57 2009
@@ -175,7 +175,10 @@
                          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; }





More information about the cfe-commits mailing list