]> granicus.if.org Git - clang/commitdiff
Use static for helper functions instead of an anonymous namespace per coding standards.
authorCraig Topper <craig.topper@gmail.com>
Mon, 1 Jul 2013 03:38:29 +0000 (03:38 +0000)
committerCraig Topper <craig.topper@gmail.com>
Mon, 1 Jul 2013 03:38:29 +0000 (03:38 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185300 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Format/BreakableToken.cpp

index d48c3cbcac49679111d808f2a9cbd5d92df91c06..ace3baa660be2bdf2d925be8334ae73ad6560699 100644 (file)
@@ -24,7 +24,6 @@
 
 namespace clang {
 namespace format {
-namespace {
 
 static const char *const Blanks = " \t\v\f";
 static bool IsBlank(char C) {
@@ -39,10 +38,10 @@ static bool IsBlank(char C) {
   }
 }
 
-BreakableToken::Split getCommentSplit(StringRef Text,
-                                      unsigned ContentStartColumn,
-                                      unsigned ColumnLimit,
-                                      encoding::Encoding Encoding) {
+static BreakableToken::Split getCommentSplit(StringRef Text,
+                                             unsigned ContentStartColumn,
+                                             unsigned ColumnLimit,
+                                             encoding::Encoding Encoding) {
   if (ColumnLimit <= ContentStartColumn + 1)
     return BreakableToken::Split(StringRef::npos, 0);
 
@@ -76,10 +75,10 @@ BreakableToken::Split getCommentSplit(StringRef Text,
   return BreakableToken::Split(StringRef::npos, 0);
 }
 
-BreakableToken::Split getStringSplit(StringRef Text,
-                                     unsigned ContentStartColumn,
-                                     unsigned ColumnLimit,
-                                     encoding::Encoding Encoding) {
+static BreakableToken::Split getStringSplit(StringRef Text,
+                                            unsigned ContentStartColumn,
+                                            unsigned ColumnLimit,
+                                            encoding::Encoding Encoding) {
   // FIXME: Reduce unit test case.
   if (Text.empty())
     return BreakableToken::Split(StringRef::npos, 0);
@@ -127,8 +126,6 @@ BreakableToken::Split getStringSplit(StringRef Text,
   return BreakableToken::Split(StringRef::npos, 0);
 }
 
-} // namespace
-
 unsigned BreakableSingleLineToken::getLineCount() const { return 1; }
 
 unsigned BreakableSingleLineToken::getLineLengthAfterSplit(