[cfe-commits] r81621 - in /cfe/trunk: include/clang/AST/DeclCXX.h lib/AST/DeclCXX.cpp lib/Sema/SemaDeclCXX.cpp

Fariborz Jahanian fjahanian at apple.com
Sat Sep 12 12:02:35 PDT 2009


Author: fjahanian
Date: Sat Sep 12 14:02:34 2009
New Revision: 81621

URL: http://llvm.org/viewvc/llvm-project?rev=81621&view=rev
Log:
Removed Context argument from couple of methods which don't
need them.

Modified:
    cfe/trunk/include/clang/AST/DeclCXX.h
    cfe/trunk/lib/AST/DeclCXX.cpp
    cfe/trunk/lib/Sema/SemaDeclCXX.cpp

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

==============================================================================
--- cfe/trunk/include/clang/AST/DeclCXX.h (original)
+++ cfe/trunk/include/clang/AST/DeclCXX.h Sat Sep 12 14:02:34 2009
@@ -595,12 +595,11 @@
   
   /// addConversionFunction - Add a new conversion function to the
   /// list of conversion functions.
-  void addConversionFunction(ASTContext &Context, CXXConversionDecl *ConvDecl);
+  void addConversionFunction(CXXConversionDecl *ConvDecl);
 
   /// \brief Add a new conversion function template to the list of conversion
   /// functions.
-  void addConversionFunction(ASTContext &Context,
-                             FunctionTemplateDecl *ConvDecl);
+  void addConversionFunction(FunctionTemplateDecl *ConvDecl);
 
   /// isAggregate - Whether this class is an aggregate (C++
   /// [dcl.init.aggr]), which is a class with no user-declared

Modified: cfe/trunk/lib/AST/DeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/DeclCXX.cpp?rev=81621&r1=81620&r2=81621&view=diff

==============================================================================
--- cfe/trunk/lib/AST/DeclCXX.cpp (original)
+++ cfe/trunk/lib/AST/DeclCXX.cpp Sat Sep 12 14:02:34 2009
@@ -388,15 +388,13 @@
   VisibleConversions.addOverload(ConvDecl);
 }
 
-void CXXRecordDecl::addConversionFunction(ASTContext &Context,
-                                          CXXConversionDecl *ConvDecl) {
+void CXXRecordDecl::addConversionFunction(CXXConversionDecl *ConvDecl) {
   assert(!ConvDecl->getDescribedFunctionTemplate() &&
          "Conversion function templates should cast to FunctionTemplateDecl.");
   Conversions.addOverload(ConvDecl);
 }
 
-void CXXRecordDecl::addConversionFunction(ASTContext &Context,
-                                          FunctionTemplateDecl *ConvDecl) {
+void CXXRecordDecl::addConversionFunction(FunctionTemplateDecl *ConvDecl) {
   assert(isa<CXXConversionDecl>(ConvDecl->getTemplatedDecl()) &&
          "Function template is not a conversion function template");
   Conversions.addOverload(ConvDecl);

Modified: cfe/trunk/lib/Sema/SemaDeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclCXX.cpp?rev=81621&r1=81620&r2=81621&view=diff

==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclCXX.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclCXX.cpp Sat Sep 12 14:02:34 2009
@@ -2321,9 +2321,9 @@
     assert(Conversion->isInvalidDecl() && "Conversion should not get here.");
   } else if (FunctionTemplateDecl *ConversionTemplate
                = Conversion->getDescribedFunctionTemplate())
-    ClassDecl->addConversionFunction(Context, ConversionTemplate);
+    ClassDecl->addConversionFunction(ConversionTemplate);
   else if (!Conversion->getPrimaryTemplate()) // ignore specializations
-    ClassDecl->addConversionFunction(Context, Conversion);
+    ClassDecl->addConversionFunction(Conversion);
 
   return DeclPtrTy::make(Conversion);
 }





More information about the cfe-commits mailing list