[cfe-commits] r100174 - /cfe/trunk/lib/Sema/SemaDeclCXX.cpp
Anders Carlsson
andersca at mac.com
Thu Apr 1 20:38:04 PDT 2010
Author: andersca
Date: Thu Apr 1 22:38:04 2010
New Revision: 100174
URL: http://llvm.org/viewvc/llvm-project?rev=100174&view=rev
Log:
Constify.
Modified:
cfe/trunk/lib/Sema/SemaDeclCXX.cpp
Modified: cfe/trunk/lib/Sema/SemaDeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclCXX.cpp?rev=100174&r1=100173&r2=100174&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclCXX.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclCXX.cpp Thu Apr 1 22:38:04 2010
@@ -1705,7 +1705,7 @@
static void
DiagnoseBaseOrMemInitializerOrder(Sema &SemaRef,
- CXXConstructorDecl *Constructor,
+ const CXXConstructorDecl *Constructor,
CXXBaseOrMemberInitializer **MemInits,
unsigned NumMemInits) {
if (Constructor->isDependentContext())
@@ -1721,15 +1721,15 @@
// of 1) base class declarations and 2) order of non-static data members.
llvm::SmallVector<const void*, 32> AllBaseOrMembers;
- CXXRecordDecl *ClassDecl
- = cast<CXXRecordDecl>(Constructor->getDeclContext());
+ const CXXRecordDecl *ClassDecl = Constructor->getParent();
+
// Push virtual bases before others.
- for (CXXRecordDecl::base_class_iterator VBase =
+ for (CXXRecordDecl::base_class_const_iterator VBase =
ClassDecl->vbases_begin(),
E = ClassDecl->vbases_end(); VBase != E; ++VBase)
AllBaseOrMembers.push_back(GetKeyForBase(VBase->getType()));
- for (CXXRecordDecl::base_class_iterator Base = ClassDecl->bases_begin(),
+ for (CXXRecordDecl::base_class_const_iterator Base = ClassDecl->bases_begin(),
E = ClassDecl->bases_end(); Base != E; ++Base) {
// Virtuals are alread in the virtual base list and are constructed
// first.
More information about the cfe-commits
mailing list