[cfe-commits] r95843 - in /cfe/trunk: include/clang/AST/DeclCXX.h lib/AST/ASTImporter.cpp lib/AST/DeclCXX.cpp lib/Sema/SemaDeclCXX.cpp
Douglas Gregor
dgregor at apple.com
Wed Feb 10 17:30:34 PST 2010
Author: dgregor
Date: Wed Feb 10 19:30:34 2010
New Revision: 95843
URL: http://llvm.org/viewvc/llvm-project?rev=95843&view=rev
Log:
Remove another redundant ASTContext parameter
Modified:
cfe/trunk/include/clang/AST/DeclCXX.h
cfe/trunk/lib/AST/ASTImporter.cpp
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=95843&r1=95842&r2=95843&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/DeclCXX.h (original)
+++ cfe/trunk/include/clang/AST/DeclCXX.h Wed Feb 10 19:30:34 2010
@@ -382,8 +382,7 @@
}
/// setBases - Sets the base classes of this struct or class.
- void setBases(ASTContext &C,
- CXXBaseSpecifier const * const *Bases, unsigned NumBases);
+ void setBases(CXXBaseSpecifier const * const *Bases, unsigned NumBases);
/// getNumBases - Retrieves the number of base classes of this
/// class.
Modified: cfe/trunk/lib/AST/ASTImporter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ASTImporter.cpp?rev=95843&r1=95842&r2=95843&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ASTImporter.cpp (original)
+++ cfe/trunk/lib/AST/ASTImporter.cpp Wed Feb 10 19:30:34 2010
@@ -739,7 +739,7 @@
T));
}
if (!Bases.empty())
- ToCXX->setBases(Importer.getToContext(), Bases.data(), Bases.size());
+ ToCXX->setBases(Bases.data(), Bases.size());
}
} else {
ToRecord = RecordDecl::Create(Importer.getToContext(), D->getTagKind(),
Modified: cfe/trunk/lib/AST/DeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/DeclCXX.cpp?rev=95843&r1=95842&r2=95843&view=diff
==============================================================================
--- cfe/trunk/lib/AST/DeclCXX.cpp (original)
+++ cfe/trunk/lib/AST/DeclCXX.cpp Wed Feb 10 19:30:34 2010
@@ -71,9 +71,10 @@
}
void
-CXXRecordDecl::setBases(ASTContext &C,
- CXXBaseSpecifier const * const *Bases,
+CXXRecordDecl::setBases(CXXBaseSpecifier const * const *Bases,
unsigned NumBases) {
+ ASTContext &C = getASTContext();
+
// C++ [dcl.init.aggr]p1:
// An aggregate is an array or a class (clause 9) with [...]
// no base classes [...].
Modified: cfe/trunk/lib/Sema/SemaDeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclCXX.cpp?rev=95843&r1=95842&r2=95843&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclCXX.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclCXX.cpp Wed Feb 10 19:30:34 2010
@@ -641,7 +641,7 @@
}
// Attach the remaining base class specifiers to the derived class.
- Class->setBases(Context, Bases, NumGoodBases);
+ Class->setBases(Bases, NumGoodBases);
// Delete the remaining (good) base class specifiers, since their
// data has been copied into the CXXRecordDecl.
More information about the cfe-commits
mailing list