diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2011-03-26 12:38:21 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2011-03-26 12:38:21 +0000 |
commit | da57f3eeab7b7f7f6e6788956f0a0d9adf196a7d (patch) | |
tree | 0c5650b6d2b9bfd8ecb3ebeff8bdd377bbb43f8d | |
parent | dceb53180ae145915673913a9398ba4a00b05584 (diff) |
Make helpers static.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128339 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/AST/ASTImporter.cpp | 2 | ||||
-rw-r--r-- | lib/Analysis/UninitializedValues.cpp | 4 | ||||
-rw-r--r-- | lib/Sema/SemaCodeComplete.cpp | 6 | ||||
-rw-r--r-- | lib/Sema/SemaTemplate.cpp | 3 |
4 files changed, 8 insertions, 7 deletions
diff --git a/lib/AST/ASTImporter.cpp b/lib/AST/ASTImporter.cpp index 895f442eac..c92087d85f 100644 --- a/lib/AST/ASTImporter.cpp +++ b/lib/AST/ASTImporter.cpp @@ -3877,7 +3877,7 @@ Expr *ASTNodeImporter::VisitCompoundAssignOperator(CompoundAssignOperator *E) { Importer.Import(E->getOperatorLoc())); } -bool ImportCastPath(CastExpr *E, CXXCastPath &Path) { +static bool ImportCastPath(CastExpr *E, CXXCastPath &Path) { if (E->path_empty()) return false; // TODO: import cast paths diff --git a/lib/Analysis/UninitializedValues.cpp b/lib/Analysis/UninitializedValues.cpp index c2ac6310ba..6e7e915c47 100644 --- a/lib/Analysis/UninitializedValues.cpp +++ b/lib/Analysis/UninitializedValues.cpp @@ -91,6 +91,7 @@ static bool isAlwaysUninit(const Value v) { return v == Uninitialized; } +namespace { class ValueVector { llvm::BitVector vec; public: @@ -126,7 +127,6 @@ public: typedef std::pair<ValueVector *, ValueVector *> BVPair; -namespace { class CFGBlockValues { const CFG &cfg; BVPair *vals; @@ -157,7 +157,7 @@ public: ValueVector::reference operator[](const VarDecl *vd); }; -} +} // end anonymous namespace CFGBlockValues::CFGBlockValues(const CFG &c) : cfg(c), vals(0) { unsigned n = cfg.getNumBlockIDs(); diff --git a/lib/Sema/SemaCodeComplete.cpp b/lib/Sema/SemaCodeComplete.cpp index bab665a38d..df3722f2e8 100644 --- a/lib/Sema/SemaCodeComplete.cpp +++ b/lib/Sema/SemaCodeComplete.cpp @@ -1785,9 +1785,9 @@ static void AddOrdinaryNameResults(Sema::ParserCompletionContext CCC, /// /// This routine provides a fast path where we provide constant strings for /// common type names. -const char *GetCompletionTypeString(QualType T, - ASTContext &Context, - CodeCompletionAllocator &Allocator) { +static const char *GetCompletionTypeString(QualType T, + ASTContext &Context, + CodeCompletionAllocator &Allocator) { PrintingPolicy Policy(Context.PrintingPolicy); Policy.AnonymousTagLocations = false; diff --git a/lib/Sema/SemaTemplate.cpp b/lib/Sema/SemaTemplate.cpp index ad3ad0c54c..68cb6f4dfe 100644 --- a/lib/Sema/SemaTemplate.cpp +++ b/lib/Sema/SemaTemplate.cpp @@ -1097,7 +1097,8 @@ static bool DiagnoseDefaultTemplateArgument(Sema &S, /// \brief Check for unexpanded parameter packs within the template parameters /// of a template template parameter, recursively. -bool DiagnoseUnexpandedParameterPacks(Sema &S, TemplateTemplateParmDecl *TTP){ +static bool DiagnoseUnexpandedParameterPacks(Sema &S, + TemplateTemplateParmDecl *TTP) { TemplateParameterList *Params = TTP->getTemplateParameters(); for (unsigned I = 0, N = Params->size(); I != N; ++I) { NamedDecl *P = Params->getParam(I); |