r185303 - Put helper classes in an anonymous namespace.

Craig Topper craig.topper at gmail.com
Sun Jun 30 21:21:55 PDT 2013


Author: ctopper
Date: Sun Jun 30 23:21:54 2013
New Revision: 185303

URL: http://llvm.org/viewvc/llvm-project?rev=185303&view=rev
Log:
Put helper classes in an anonymous namespace.

Modified:
    cfe/trunk/lib/Format/UnwrappedLineParser.cpp

Modified: cfe/trunk/lib/Format/UnwrappedLineParser.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Format/UnwrappedLineParser.cpp?rev=185303&r1=185302&r2=185303&view=diff
==============================================================================
--- cfe/trunk/lib/Format/UnwrappedLineParser.cpp (original)
+++ cfe/trunk/lib/Format/UnwrappedLineParser.cpp Sun Jun 30 23:21:54 2013
@@ -30,6 +30,8 @@ public:
   virtual FormatToken *setPosition(unsigned Position) = 0;
 };
 
+namespace {
+
 class ScopedDeclarationState {
 public:
   ScopedDeclarationState(UnwrappedLine &Line, std::vector<bool> &Stack,
@@ -114,6 +116,8 @@ private:
   FormatToken *Token;
 };
 
+} // end anonymous namespace
+
 class ScopedLineState {
 public:
   ScopedLineState(UnwrappedLineParser &Parser,
@@ -145,6 +149,8 @@ private:
   UnwrappedLine *PreBlockLine;
 };
 
+namespace {
+
 class IndexedTokenSource : public FormatTokenSource {
 public:
   IndexedTokenSource(ArrayRef<FormatToken *> Tokens)
@@ -170,6 +176,8 @@ private:
   int Position;
 };
 
+} // end anonymous namespace
+
 UnwrappedLineParser::UnwrappedLineParser(const FormatStyle &Style,
                                          ArrayRef<FormatToken *> Tokens,
                                          UnwrappedLineConsumer &Callback)





More information about the cfe-commits mailing list