summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/DeclCXX.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-01-20 00:46:10 +0000
committerJohn McCall <rjmccall@apple.com>2010-01-20 00:46:10 +0000
commitad371258aaafe17b1d1459458cb70cd1332cd064 (patch)
treed0b85bcf8f7e753adb3a0df4c6ca6f37ccb735b4 /clang/lib/AST/DeclCXX.cpp
parente43fe7cbb76284bf5ae2f295b0762935bffee404 (diff)
downloadbcm5719-llvm-ad371258aaafe17b1d1459458cb70cd1332cd064.tar.gz
bcm5719-llvm-ad371258aaafe17b1d1459458cb70cd1332cd064.zip
Give UnresolvedSet the ability to store access specifiers for each declaration.
Change LookupResult to use UnresolvedSet. Also extract UnresolvedSet into its own header and make it templated over an inline capacity. llvm-svn: 93959
Diffstat (limited to 'clang/lib/AST/DeclCXX.cpp')
-rw-r--r--clang/lib/AST/DeclCXX.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/clang/lib/AST/DeclCXX.cpp b/clang/lib/AST/DeclCXX.cpp
index 1cce35c0b39..fe6064df325 100644
--- a/clang/lib/AST/DeclCXX.cpp
+++ b/clang/lib/AST/DeclCXX.cpp
@@ -312,8 +312,9 @@ void
CXXRecordDecl::collectConversionFunctions(
llvm::SmallPtrSet<CanQualType, 8>& ConversionsTypeSet) const
{
- const UnresolvedSet *Cs = getConversionFunctions();
- for (UnresolvedSet::iterator I = Cs->begin(), E = Cs->end(); I != E; ++I) {
+ const UnresolvedSetImpl *Cs = getConversionFunctions();
+ for (UnresolvedSetImpl::iterator I = Cs->begin(), E = Cs->end();
+ I != E; ++I) {
NamedDecl *TopConv = *I;
CanQualType TConvType;
if (FunctionTemplateDecl *TConversionTemplate =
@@ -344,10 +345,11 @@ CXXRecordDecl::getNestedVisibleConversionFunctions(CXXRecordDecl *RD,
bool inTopClass = (RD == this);
QualType ClassType = getASTContext().getTypeDeclType(this);
if (const RecordType *Record = ClassType->getAs<RecordType>()) {
- const UnresolvedSet *Cs
+ const UnresolvedSetImpl *Cs
= cast<CXXRecordDecl>(Record->getDecl())->getConversionFunctions();
- for (UnresolvedSet::iterator I = Cs->begin(), E = Cs->end(); I != E; ++I) {
+ for (UnresolvedSetImpl::iterator I = Cs->begin(), E = Cs->end();
+ I != E; ++I) {
NamedDecl *Conv = *I;
// Only those conversions not exact match of conversions in current
// class are candidateconversion routines.
@@ -410,7 +412,7 @@ CXXRecordDecl::getNestedVisibleConversionFunctions(CXXRecordDecl *RD,
/// getVisibleConversionFunctions - get all conversion functions visible
/// in current class; including conversion function templates.
-const UnresolvedSet *CXXRecordDecl::getVisibleConversionFunctions() {
+const UnresolvedSetImpl *CXXRecordDecl::getVisibleConversionFunctions() {
// If root class, all conversions are visible.
if (bases_begin() == bases_end())
return &Conversions;
OpenPOWER on IntegriCloud