diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-12-22 00:34:07 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-12-22 00:34:07 +0000 |
commit | 507eb87f05bf20310ebb24e2ddb7b5517f909a62 (patch) | |
tree | c3342da9c0537786f082f226a3eda42709cb1aa6 /clang/lib/AST/DeclCXX.cpp | |
parent | 4141d5bea240f3a01a01c94a778c6b4c4e839847 (diff) | |
download | bcm5719-llvm-507eb87f05bf20310ebb24e2ddb7b5517f909a62.tar.gz bcm5719-llvm-507eb87f05bf20310ebb24e2ddb7b5517f909a62.zip |
Eliminate the ASTContext argument to CXXConstructorDecl::isCopyConstructor, since the context is available in the Decl
llvm-svn: 91862
Diffstat (limited to 'clang/lib/AST/DeclCXX.cpp')
-rw-r--r-- | clang/lib/AST/DeclCXX.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/clang/lib/AST/DeclCXX.cpp b/clang/lib/AST/DeclCXX.cpp index 986b81c0f85..bbbb19a35b4 100644 --- a/clang/lib/AST/DeclCXX.cpp +++ b/clang/lib/AST/DeclCXX.cpp @@ -164,8 +164,7 @@ CXXConstructorDecl *CXXRecordDecl::getCopyConstructor(ASTContext &Context, if (isa<FunctionTemplateDecl>(*Con)) continue; - if (cast<CXXConstructorDecl>(*Con)->isCopyConstructor(Context, - FoundTQs)) { + if (cast<CXXConstructorDecl>(*Con)->isCopyConstructor(FoundTQs)) { if (((TypeQuals & Qualifiers::Const) == (FoundTQs & Qualifiers::Const)) || (!(TypeQuals & Qualifiers::Const) && (FoundTQs & Qualifiers::Const))) return cast<CXXConstructorDecl>(*Con); @@ -246,7 +245,7 @@ CXXRecordDecl::addedConstructor(ASTContext &Context, // Note when we have a user-declared copy constructor, which will // suppress the implicit declaration of a copy constructor. - if (ConDecl->isCopyConstructor(Context)) { + if (ConDecl->isCopyConstructor()) { UserDeclaredCopyConstructor = true; // C++ [class.copy]p6: @@ -757,8 +756,7 @@ bool CXXConstructorDecl::isDefaultConstructor() const { } bool -CXXConstructorDecl::isCopyConstructor(ASTContext &Context, - unsigned &TypeQuals) const { +CXXConstructorDecl::isCopyConstructor(unsigned &TypeQuals) const { // C++ [class.copy]p2: // A non-template constructor for class X is a copy constructor // if its first parameter is of type X&, const X&, volatile X& or @@ -779,6 +777,8 @@ CXXConstructorDecl::isCopyConstructor(ASTContext &Context, return false; // Is it a reference to our class type? + ASTContext &Context = getASTContext(); + CanQualType PointeeType = Context.getCanonicalType(ParamRefType->getPointeeType()); CanQualType ClassTy |