diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2012-02-02 03:46:19 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2012-02-02 03:46:19 +0000 |
commit | fa0df83eba3c53f9c34242b93d74021971c2363c (patch) | |
tree | 3fc766e92a3aa06e655b4ba5bdfcef3e60b93e4a /clang/lib/Sema/SemaInit.cpp | |
parent | 961883c1cfb8274ae4b7096a1f2e418d03fcb3e4 (diff) | |
download | bcm5719-llvm-fa0df83eba3c53f9c34242b93d74021971c2363c.tar.gz bcm5719-llvm-fa0df83eba3c53f9c34242b93d74021971c2363c.zip |
Split Sema::MarkDeclarationReferenced into multiple functions; the additional entry points are needed to implement C++11 odr-use marking correctly. No functional change in this patch; I'll actually make the change which fixes the odr-use marking in a followup patch.
llvm-svn: 149586
Diffstat (limited to 'clang/lib/Sema/SemaInit.cpp')
-rw-r--r-- | clang/lib/Sema/SemaInit.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/clang/lib/Sema/SemaInit.cpp b/clang/lib/Sema/SemaInit.cpp index 3da73b77bb8..096ca7c93bf 100644 --- a/clang/lib/Sema/SemaInit.cpp +++ b/clang/lib/Sema/SemaInit.cpp @@ -3156,7 +3156,7 @@ static OverloadingResult TryRefInitWithConversionFunction(Sema &S, // This is the overload that will actually be used for the initialization, so // mark it as used. - S.MarkDeclarationReferenced(DeclLoc, Function); + S.MarkFunctionReferenced(DeclLoc, Function); // Compute the returned type of the conversion. if (isa<CXXConversionDecl>(Function)) @@ -3679,7 +3679,7 @@ static void TryUserDefinedConversion(Sema &S, } FunctionDecl *Function = Best->Function; - S.MarkDeclarationReferenced(DeclLoc, Function); + S.MarkFunctionReferenced(DeclLoc, Function); bool HadMultipleCandidates = (CandidateSet.size() > 1); if (isa<CXXConstructorDecl>(Function)) { @@ -4388,7 +4388,7 @@ static ExprResult CopyObject(Sema &S, return S.Owned(CurInitExpr); } - S.MarkDeclarationReferenced(Loc, Constructor); + S.MarkFunctionReferenced(Loc, Constructor); // Determine the arguments required to actually perform the // constructor call (we might have derived-to-base conversions, or @@ -4531,7 +4531,7 @@ PerformConstructorInitialization(Sema &S, // An explicitly-constructed temporary, e.g., X(1, 2). unsigned NumExprs = ConstructorArgs.size(); Expr **Exprs = (Expr **)ConstructorArgs.take(); - S.MarkDeclarationReferenced(Loc, Constructor); + S.MarkFunctionReferenced(Loc, Constructor); S.DiagnoseUseOfDecl(Constructor, Loc); TypeSourceInfo *TSInfo = Entity.getTypeSourceInfo(); @@ -4899,7 +4899,7 @@ InitializationSequence::Perform(Sema &S, = S.LookupDestructor(cast<CXXRecordDecl>(Record->getDecl())); S.CheckDestructorAccess(CurInit.get()->getLocStart(), Destructor, S.PDiag(diag::err_access_dtor_temp) << T); - S.MarkDeclarationReferenced(CurInit.get()->getLocStart(), Destructor); + S.MarkFunctionReferenced(CurInit.get()->getLocStart(), Destructor); S.DiagnoseUseOfDecl(Destructor, CurInit.get()->getLocStart()); } } |