diff options
author | Anders Carlsson <andersca@mac.com> | 2010-04-21 18:47:17 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2010-04-21 18:47:17 +0000 |
commit | 9a68a67c6ae4982001815cc04f69b8781058263a (patch) | |
tree | 1e7092526e04aaf5918bdf15e633110c25fa39d0 /lib/Sema/SemaInit.cpp | |
parent | c2a9b7973922cab0c0c56d46829d232ce3f4aacf (diff) |
Pass the InitializedEntity to Sema::CheckConstructorAccess and use it to report different diagnostics depending on which entity is being initialized.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102010 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaInit.cpp')
-rw-r--r-- | lib/Sema/SemaInit.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Sema/SemaInit.cpp b/lib/Sema/SemaInit.cpp index a99f513609..fe7f79f9c5 100644 --- a/lib/Sema/SemaInit.cpp +++ b/lib/Sema/SemaInit.cpp @@ -3258,7 +3258,7 @@ static Sema::OwningExprResult CopyObject(Sema &S, ASTOwningVector<&ActionBase::DeleteExpr> ConstructorArgs(S); CurInit.release(); // Ownership transferred into MultiExprArg, below. - S.CheckConstructorAccess(Loc, Constructor, + S.CheckConstructorAccess(Loc, Constructor, Entity, Best->FoundDecl.getAccess()); if (IsExtraneousCopy) { @@ -3521,7 +3521,7 @@ InitializationSequence::Perform(Sema &S, if (CurInit.isInvalid()) return S.ExprError(); - S.CheckConstructorAccess(Kind.getLocation(), Constructor, + S.CheckConstructorAccess(Kind.getLocation(), Constructor, Entity, FoundFn.getAccess()); CastKind = CastExpr::CK_ConstructorConversion; @@ -3647,7 +3647,7 @@ InitializationSequence::Perform(Sema &S, return S.ExprError(); // Only check access if all of that succeeded. - S.CheckConstructorAccess(Loc, Constructor, + S.CheckConstructorAccess(Loc, Constructor, Entity, Step->Function.FoundDecl.getAccess()); if (shouldBindAsTemporary(Entity)) |