]> granicus.if.org Git - clang/commitdiff
Make helpers static.
authorBenjamin Kramer <benny.kra@googlemail.com>
Sat, 26 Mar 2011 12:38:21 +0000 (12:38 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Sat, 26 Mar 2011 12:38:21 +0000 (12:38 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128339 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/ASTImporter.cpp
lib/Analysis/UninitializedValues.cpp
lib/Sema/SemaCodeComplete.cpp
lib/Sema/SemaTemplate.cpp

index 895f442eacadd5200617d1608a17476aaca263cc..c92087d85fd4d7d4496cb1bbc3afa2e1b54f93b5 100644 (file)
@@ -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
index c2ac6310ba3239804505f20424b4823d16d8fe4c..6e7e915c474a23d1323d2fd56d70cc107e575804 100644 (file)
@@ -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();
index bab665a38da7f0d2ae1061185b28ad08a063aabc..df3722f2e812cef00e2638fc449577b9550dbb44 100644 (file)
@@ -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;
 
index ad3ad0c54cc973521fe22a9c7b1af33f05dfec04..68cb6f4dfe6d18b36e064ad6fbed2f556837d462 100644 (file)
@@ -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);