From: Francisco Lopes da Silva Date: Thu, 29 Jan 2015 05:54:59 +0000 (+0000) Subject: Sema: Turn some applicable functions static. NBC. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f86a3c2715a67bc76a676fc223e3c52ff66c755a;p=clang Sema: Turn some applicable functions static. NBC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@227418 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Sema/SemaCodeComplete.cpp b/lib/Sema/SemaCodeComplete.cpp index 5aa28cdc6c..341d45435c 100644 --- a/lib/Sema/SemaCodeComplete.cpp +++ b/lib/Sema/SemaCodeComplete.cpp @@ -3864,10 +3864,10 @@ static bool anyNullArguments(ArrayRef Args) { typedef CodeCompleteConsumer::OverloadCandidate ResultCandidate; -void mergeCandidatesWithResults(Sema &SemaRef, - SmallVectorImpl &Results, - OverloadCandidateSet &CandidateSet, - SourceLocation Loc) { +static void mergeCandidatesWithResults(Sema &SemaRef, + SmallVectorImpl &Results, + OverloadCandidateSet &CandidateSet, + SourceLocation Loc) { if (!CandidateSet.empty()) { // Sort the overload candidate set by placing the best overloads first. std::stable_sort( @@ -3885,8 +3885,9 @@ void mergeCandidatesWithResults(Sema &SemaRef, /// \brief Get the type of the Nth parameter from a given set of overload /// candidates. -QualType getParamType(Sema &SemaRef, ArrayRef Candidates, - unsigned N) { +static QualType getParamType(Sema &SemaRef, + ArrayRef Candidates, + unsigned N) { // Given the overloads 'Candidates' for a function call matching all arguments // up to N, return the type of the Nth parameter if it is the same for all @@ -3909,9 +3910,9 @@ QualType getParamType(Sema &SemaRef, ArrayRef Candidates, return ParamType; } -void CodeCompleteOverloadResults(Sema &SemaRef, Scope *S, - MutableArrayRef Candidates, - unsigned CurrentArg, +static void CodeCompleteOverloadResults(Sema &SemaRef, Scope *S, + MutableArrayRef Candidates, + unsigned CurrentArg, bool CompleteExpressionWithCurrentArg = true) { QualType ParamType; if (CompleteExpressionWithCurrentArg)