r306291 - Improve const-correctness.

Axel Naumann via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 26 08:06:41 PDT 2017


Author: axel
Date: Mon Jun 26 08:06:40 2017
New Revision: 306291

URL: http://llvm.org/viewvc/llvm-project?rev=306291&view=rev
Log:
Improve const-correctness.

Modified:
    cfe/trunk/include/clang/Parse/Parser.h

Modified: cfe/trunk/include/clang/Parse/Parser.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Parse/Parser.h?rev=306291&r1=306290&r2=306291&view=diff
==============================================================================
--- cfe/trunk/include/clang/Parse/Parser.h (original)
+++ cfe/trunk/include/clang/Parse/Parser.h Mon Jun 26 08:06:40 2017
@@ -604,7 +604,7 @@ public:
   }
 
   /// getTypeAnnotation - Read a parsed type out of an annotation token.
-  static ParsedType getTypeAnnotation(Token &Tok) {
+  static ParsedType getTypeAnnotation(const Token &Tok) {
     return ParsedType::getFromOpaquePtr(Tok.getAnnotationValue());
   }
 
@@ -615,7 +615,7 @@ private:
 
   /// \brief Read an already-translated primary expression out of an annotation
   /// token.
-  static ExprResult getExprAnnotation(Token &Tok) {
+  static ExprResult getExprAnnotation(const Token &Tok) {
     return ExprResult::getFromOpaquePointer(Tok.getAnnotationValue());
   }
 




More information about the cfe-commits mailing list