[cfe-commits] r128339 - in /cfe/trunk/lib: AST/ASTImporter.cpp Analysis/UninitializedValues.cpp Sema/SemaCodeComplete.cpp Sema/SemaTemplate.cpp

Benjamin Kramer benny.kra at googlemail.com
Sat Mar 26 05:38:21 PDT 2011


Author: d0k
Date: Sat Mar 26 07:38:21 2011
New Revision: 128339

URL: http://llvm.org/viewvc/llvm-project?rev=128339&view=rev
Log:
Make helpers static.

Modified:
    cfe/trunk/lib/AST/ASTImporter.cpp
    cfe/trunk/lib/Analysis/UninitializedValues.cpp
    cfe/trunk/lib/Sema/SemaCodeComplete.cpp
    cfe/trunk/lib/Sema/SemaTemplate.cpp

Modified: cfe/trunk/lib/AST/ASTImporter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ASTImporter.cpp?rev=128339&r1=128338&r2=128339&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ASTImporter.cpp (original)
+++ cfe/trunk/lib/AST/ASTImporter.cpp Sat Mar 26 07:38:21 2011
@@ -3877,7 +3877,7 @@
                                           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

Modified: cfe/trunk/lib/Analysis/UninitializedValues.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/UninitializedValues.cpp?rev=128339&r1=128338&r2=128339&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/UninitializedValues.cpp (original)
+++ cfe/trunk/lib/Analysis/UninitializedValues.cpp Sat Mar 26 07:38:21 2011
@@ -91,6 +91,7 @@
   return v == Uninitialized;
 }
 
+namespace {
 class ValueVector {
   llvm::BitVector vec;
 public:
@@ -126,7 +127,6 @@
 
 typedef std::pair<ValueVector *, ValueVector *> BVPair;
 
-namespace {
 class CFGBlockValues {
   const CFG &cfg;
   BVPair *vals;
@@ -157,7 +157,7 @@
   
   ValueVector::reference operator[](const VarDecl *vd);
 };  
-}
+} // end anonymous namespace
 
 CFGBlockValues::CFGBlockValues(const CFG &c) : cfg(c), vals(0) {
   unsigned n = cfg.getNumBlockIDs();

Modified: cfe/trunk/lib/Sema/SemaCodeComplete.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaCodeComplete.cpp?rev=128339&r1=128338&r2=128339&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaCodeComplete.cpp (original)
+++ cfe/trunk/lib/Sema/SemaCodeComplete.cpp Sat Mar 26 07:38:21 2011
@@ -1785,9 +1785,9 @@
 ///
 /// 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;
 

Modified: cfe/trunk/lib/Sema/SemaTemplate.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaTemplate.cpp?rev=128339&r1=128338&r2=128339&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaTemplate.cpp (original)
+++ cfe/trunk/lib/Sema/SemaTemplate.cpp Sat Mar 26 07:38:21 2011
@@ -1097,7 +1097,8 @@
 
 /// \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);





More information about the cfe-commits mailing list