[cfe-commits] r130058 - in /cfe/trunk: include/clang/Parse/Parser.h include/clang/Sema/Sema.h lib/Parse/ParseTemplate.cpp lib/Sema/SemaTemplateInstantiateDecl.cpp

Francois Pichet pichet2000 at gmail.com
Sat Apr 23 04:52:20 PDT 2011


Author: fpichet
Date: Sat Apr 23 06:52:20 2011
New Revision: 130058

URL: http://llvm.org/viewvc/llvm-project?rev=130058&view=rev
Log:
Remove unnecessary const away cast in LateTemplateParserCallback.

Modified:
    cfe/trunk/include/clang/Parse/Parser.h
    cfe/trunk/include/clang/Sema/Sema.h
    cfe/trunk/lib/Parse/ParseTemplate.cpp
    cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp

Modified: cfe/trunk/include/clang/Parse/Parser.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Parse/Parser.h?rev=130058&r1=130057&r2=130058&view=diff
==============================================================================
--- cfe/trunk/include/clang/Parse/Parser.h (original)
+++ cfe/trunk/include/clang/Parse/Parser.h Sat Apr 23 06:52:20 2011
@@ -937,8 +937,8 @@
     LateParsedTemplateMapT;
   LateParsedTemplateMapT LateParsedTemplateMap;
 
-  static void LateTemplateParserCallback(void *P, FunctionDecl *FD);
-  void LateTemplateParser(FunctionDecl *FD);
+  static void LateTemplateParserCallback(void *P, const FunctionDecl *FD);
+  void LateTemplateParser(const FunctionDecl *FD);
 
   Sema::ParsingClassState
   PushParsingClass(Decl *TagOrTemplate, bool TopLevelClass);

Modified: cfe/trunk/include/clang/Sema/Sema.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Sema/Sema.h?rev=130058&r1=130057&r2=130058&view=diff
==============================================================================
--- cfe/trunk/include/clang/Sema/Sema.h (original)
+++ cfe/trunk/include/clang/Sema/Sema.h Sat Apr 23 06:52:20 2011
@@ -308,7 +308,7 @@
   llvm::SmallVector<const DeclaratorDecl*, 4> UnusedFileScopedDecls;
 
   /// \brief Callback to the parser to parse templated functions when needed.
-  typedef void LateTemplateParserCB(void *P, FunctionDecl *FD);
+  typedef void LateTemplateParserCB(void *P, const FunctionDecl *FD);
   LateTemplateParserCB *LateTemplateParser;
   void *OpaqueParser; 
 

Modified: cfe/trunk/lib/Parse/ParseTemplate.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseTemplate.cpp?rev=130058&r1=130057&r2=130058&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseTemplate.cpp (original)
+++ cfe/trunk/lib/Parse/ParseTemplate.cpp Sat Apr 23 06:52:20 2011
@@ -1128,12 +1128,12 @@
   return R;
 }
 
-void Parser::LateTemplateParserCallback(void *P, FunctionDecl *FD) {
+void Parser::LateTemplateParserCallback(void *P, const FunctionDecl *FD) {
   ((Parser*)P)->LateTemplateParser(FD);
 }
 
 
-void Parser::LateTemplateParser(FunctionDecl *FD) {
+void Parser::LateTemplateParser(const FunctionDecl *FD) {
   LateParsedTemplatedFunction *LPT = LateParsedTemplateMap[FD];
   if (LPT) {
     ParseLateTemplatedFuncDef(*LPT);

Modified: cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp?rev=130058&r1=130057&r2=130058&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp (original)
+++ cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp Sat Apr 23 06:52:20 2011
@@ -2273,7 +2273,7 @@
   // a templated function definition. 
   if (!Pattern && PatternDecl && PatternDecl->isLateTemplateParsed() &&
       LateTemplateParser) {
-    LateTemplateParser(OpaqueParser, (FunctionDecl*)PatternDecl);
+    LateTemplateParser(OpaqueParser, PatternDecl);
     Pattern = PatternDecl->getBody(PatternDecl);
   }
 





More information about the cfe-commits mailing list