[cfe-commits] r49629 - in /cfe/trunk: include/clang/Parse/Parser.h lib/Parse/ParseDeclCXX.cpp

Douglas Gregor doug.gregor at gmail.com
Sun Apr 13 17:13:42 PDT 2008


Author: dgregor
Date: Sun Apr 13 19:13:42 2008
New Revision: 49629

URL: http://llvm.org/viewvc/llvm-project?rev=49629&view=rev
Log:
Make Parser::getAccessSpecifierIfPresent const, since it does not modify the state

Modified:
    cfe/trunk/include/clang/Parse/Parser.h
    cfe/trunk/lib/Parse/ParseDeclCXX.cpp

Modified: cfe/trunk/include/clang/Parse/Parser.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Parse/Parser.h?rev=49629&r1=49628&r2=49629&view=diff

==============================================================================
--- cfe/trunk/include/clang/Parse/Parser.h (original)
+++ cfe/trunk/include/clang/Parse/Parser.h Sun Apr 13 19:13:42 2008
@@ -489,7 +489,7 @@
   // C++ 10: Derived classes [class.derived]
   void ParseBaseClause(DeclTy *ClassDecl);
   bool ParseBaseSpecifier(DeclTy *ClassDecl);
-  AccessSpecifier getAccessSpecifierIfPresent();
+  AccessSpecifier getAccessSpecifierIfPresent() const;
 };
 
 }  // end namespace clang

Modified: cfe/trunk/lib/Parse/ParseDeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseDeclCXX.cpp?rev=49629&r1=49628&r2=49629&view=diff

==============================================================================
--- cfe/trunk/lib/Parse/ParseDeclCXX.cpp (original)
+++ cfe/trunk/lib/Parse/ParseDeclCXX.cpp Sun Apr 13 19:13:42 2008
@@ -11,9 +11,9 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include "clang/Parse/Parser.h"
 #include "clang/Basic/Diagnostic.h"
 #include "clang/Parse/DeclSpec.h"
-#include "clang/Parse/Parser.h"
 #include "clang/Parse/Scope.h"
 using namespace clang;
 
@@ -339,7 +339,7 @@
 ///         'private'
 ///         'protected'
 ///         'public'
-AccessSpecifier Parser::getAccessSpecifierIfPresent()
+AccessSpecifier Parser::getAccessSpecifierIfPresent() const
 {
   switch (Tok.getKind()) {
   default: return AS_none;





More information about the cfe-commits mailing list