summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/DeclCXX.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2009-10-12 18:36:50 +0000
committerFariborz Jahanian <fjahanian@apple.com>2009-10-12 18:36:50 +0000
commit65694b413d044004169b9e9d8bc04e87624d4c52 (patch)
treefa123b8c8a64f43dc99d448f74d82176f4be3333 /clang/lib/AST/DeclCXX.cpp
parent6208bc171a9c4a51deede8c20e1e6a40b26f55f4 (diff)
downloadbcm5719-llvm-65694b413d044004169b9e9d8bc04e87624d4c52.tar.gz
bcm5719-llvm-65694b413d044004169b9e9d8bc04e87624d4c52.zip
Use CanQualType (instead of QualType) to store collection of visible
canonical conversion types. llvm-svn: 83869
Diffstat (limited to 'clang/lib/AST/DeclCXX.cpp')
-rw-r--r--clang/lib/AST/DeclCXX.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/clang/lib/AST/DeclCXX.cpp b/clang/lib/AST/DeclCXX.cpp
index fc5f5934b0e..64e800094e0 100644
--- a/clang/lib/AST/DeclCXX.cpp
+++ b/clang/lib/AST/DeclCXX.cpp
@@ -287,14 +287,15 @@ void CXXRecordDecl::addedAssignmentOperator(ASTContext &Context,
void
CXXRecordDecl::collectConversionFunctions(
- llvm::SmallPtrSet<QualType, 8>& ConversionsTypeSet) {
+ llvm::SmallPtrSet<CanQualType, 8>& ConversionsTypeSet)
+{
OverloadedFunctionDecl *TopConversions = getConversionFunctions();
for (OverloadedFunctionDecl::function_iterator
TFunc = TopConversions->function_begin(),
TFuncEnd = TopConversions->function_end();
TFunc != TFuncEnd; ++TFunc) {
NamedDecl *TopConv = TFunc->get();
- QualType TConvType;
+ CanQualType TConvType;
if (FunctionTemplateDecl *TConversionTemplate =
dyn_cast<FunctionTemplateDecl>(TopConv))
TConvType =
@@ -317,8 +318,9 @@ CXXRecordDecl::collectConversionFunctions(
/// in current class.
void
CXXRecordDecl::getNestedVisibleConversionFunctions(CXXRecordDecl *RD,
- const llvm::SmallPtrSet<QualType, 8> &TopConversionsTypeSet,
- const llvm::SmallPtrSet<QualType, 8> &HiddenConversionTypes) {
+ const llvm::SmallPtrSet<CanQualType, 8> &TopConversionsTypeSet,
+ const llvm::SmallPtrSet<CanQualType, 8> &HiddenConversionTypes)
+{
bool inTopClass = (RD == this);
QualType ClassType = getASTContext().getTypeDeclType(this);
if (const RecordType *Record = ClassType->getAs<RecordType>()) {
@@ -332,7 +334,7 @@ CXXRecordDecl::getNestedVisibleConversionFunctions(CXXRecordDecl *RD,
NamedDecl *Conv = Func->get();
// Only those conversions not exact match of conversions in current
// class are candidateconversion routines.
- QualType ConvType;
+ CanQualType ConvType;
if (FunctionTemplateDecl *ConversionTemplate =
dyn_cast<FunctionTemplateDecl>(Conv))
ConvType =
@@ -360,7 +362,7 @@ CXXRecordDecl::getNestedVisibleConversionFunctions(CXXRecordDecl *RD,
if (getNumBases() == 0 && getNumVBases() == 0)
return;
- llvm::SmallPtrSet<QualType, 8> ConversionFunctions;
+ llvm::SmallPtrSet<CanQualType, 8> ConversionFunctions;
if (!inTopClass)
collectConversionFunctions(ConversionFunctions);
@@ -397,7 +399,7 @@ CXXRecordDecl::getVisibleConversionFunctions() {
// If visible conversion list is already evaluated, return it.
if (ComputedVisibleConversions)
return &VisibleConversions;
- llvm::SmallPtrSet<QualType, 8> TopConversionsTypeSet;
+ llvm::SmallPtrSet<CanQualType, 8> TopConversionsTypeSet;
collectConversionFunctions(TopConversionsTypeSet);
getNestedVisibleConversionFunctions(this, TopConversionsTypeSet,
TopConversionsTypeSet);
OpenPOWER on IntegriCloud