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 | 9e9199d8649cf3e10c98a69403f05dbb666d8fb1 (patch) | |
tree | 5051ff7f4e0191e7d7dc9606c698986689483526 /lib/Sema | |
parent | 0d6d12b2db47ff34d6cd30917992a8c8ad97aac2 (diff) |
Eliminate the ASTContext argument to CXXConstructorDecl::isCopyConstructor, since the context is available in the Decl
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91862 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema')
-rw-r--r-- | lib/Sema/SemaDecl.cpp | 2 | ||||
-rw-r--r-- | lib/Sema/SemaDeclCXX.cpp | 4 | ||||
-rw-r--r-- | lib/Sema/SemaExpr.cpp | 2 | ||||
-rw-r--r-- | lib/Sema/SemaInit.cpp | 2 | ||||
-rw-r--r-- | lib/Sema/SemaOverload.cpp | 2 |
5 files changed, 6 insertions, 6 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index d83f852748..a179265130 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -800,7 +800,7 @@ static Sema::CXXSpecialMember getSpecialMember(ASTContext &Ctx, if (const CXXConstructorDecl *Ctor = dyn_cast<CXXConstructorDecl>(MD)) { if (Ctor->isDefaultConstructor()) return Sema::CXXDefaultConstructor; - if (Ctor->isCopyConstructor(Ctx)) + if (Ctor->isCopyConstructor()) return Sema::CXXCopyConstructor; } diff --git a/lib/Sema/SemaDeclCXX.cpp b/lib/Sema/SemaDeclCXX.cpp index 7343e9f2e7..1f3fbba629 100644 --- a/lib/Sema/SemaDeclCXX.cpp +++ b/lib/Sema/SemaDeclCXX.cpp @@ -3732,7 +3732,7 @@ void Sema::DefineImplicitCopyConstructor(SourceLocation CurrentLocation, CXXConstructorDecl *CopyConstructor, unsigned TypeQuals) { assert((CopyConstructor->isImplicit() && - CopyConstructor->isCopyConstructor(Context, TypeQuals) && + CopyConstructor->isCopyConstructor(TypeQuals) && !CopyConstructor->isUsed()) && "DefineImplicitCopyConstructor - call it for implicit copy ctor"); @@ -3784,7 +3784,7 @@ Sema::BuildCXXConstructExpr(SourceLocation ConstructLoc, QualType DeclInitType, // all, even if the class copy constructor or destructor have side effects. // FIXME: Is this enough? - if (Constructor->isCopyConstructor(Context)) { + if (Constructor->isCopyConstructor()) { Expr *E = ((Expr **)ExprArgs.get())[0]; if (ImplicitCastExpr *ICE = dyn_cast<ImplicitCastExpr>(E)) if (ICE->getCastKind() == CastExpr::CK_NoOp) diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp index f67a7a6bb9..f8afd0f33e 100644 --- a/lib/Sema/SemaExpr.cpp +++ b/lib/Sema/SemaExpr.cpp @@ -7011,7 +7011,7 @@ void Sema::MarkDeclarationReferenced(SourceLocation Loc, Decl *D) { if (!Constructor->isUsed()) DefineImplicitDefaultConstructor(Loc, Constructor); } else if (Constructor->isImplicit() && - Constructor->isCopyConstructor(Context, TypeQuals)) { + Constructor->isCopyConstructor(TypeQuals)) { if (!Constructor->isUsed()) DefineImplicitCopyConstructor(Loc, Constructor, TypeQuals); } diff --git a/lib/Sema/SemaInit.cpp b/lib/Sema/SemaInit.cpp index 2a27466a55..3ff2588356 100644 --- a/lib/Sema/SemaInit.cpp +++ b/lib/Sema/SemaInit.cpp @@ -3096,7 +3096,7 @@ static Sema::OwningExprResult CopyIfRequiredForEntity(Sema &S, // Find the constructor (which may be a template). CXXConstructorDecl *Constructor = dyn_cast<CXXConstructorDecl>(*Con); if (!Constructor || Constructor->isInvalidDecl() || - !Constructor->isCopyConstructor(S.Context)) + !Constructor->isCopyConstructor()) continue; S.AddOverloadCandidate(Constructor, &CurInitExpr, 1, CandidateSet); diff --git a/lib/Sema/SemaOverload.cpp b/lib/Sema/SemaOverload.cpp index 66aa4845b1..8236ad7eec 100644 --- a/lib/Sema/SemaOverload.cpp +++ b/lib/Sema/SemaOverload.cpp @@ -451,7 +451,7 @@ Sema::TryImplicitConversion(Expr* From, QualType ToType, QualType FromCanon = Context.getCanonicalType(From->getType().getUnqualifiedType()); QualType ToCanon = Context.getCanonicalType(ToType).getUnqualifiedType(); - if (Constructor->isCopyConstructor(Context) && + if (Constructor->isCopyConstructor() && (FromCanon == ToCanon || IsDerivedFrom(FromCanon, ToCanon))) { // Turn this into a "standard" conversion sequence, so that it // gets ranked with standard conversion sequences. |