]> granicus.if.org Git - clang/commitdiff
moved CFGBuilder into an anonymous namespace
authorTed Kremenek <kremenek@apple.com>
Thu, 23 Aug 2007 21:26:19 +0000 (21:26 +0000)
committerTed Kremenek <kremenek@apple.com>
Thu, 23 Aug 2007 21:26:19 +0000 (21:26 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41334 91177308-0d34-0410-b5e6-96231b3b80d8

AST/CFG.cpp

index b05f8d549540cb7bcec514619fd6892fb4d88f4b..b11162e6154515a64e601a089b193f29077dddaa 100644 (file)
@@ -23,17 +23,16 @@ using namespace clang;
 
 namespace {
 
-  // SaveAndRestore - A utility class that uses RIIA to save and restore
-  //  the value of a variable.
-  template<typename T>
-  struct SaveAndRestore {
-    SaveAndRestore(T& x) : X(x), old_value(x) {}
-    ~SaveAndRestore() { X = old_value; }
-    
-    T& X;
-    T old_value;
-  };
-}
+// SaveAndRestore - A utility class that uses RIIA to save and restore
+//  the value of a variable.
+template<typename T>
+struct SaveAndRestore {
+  SaveAndRestore(T& x) : X(x), old_value(x) {}
+  ~SaveAndRestore() { X = old_value; }
+  
+  T& X;
+  T old_value;
+};
   
 /// CFGBuilder - This class is implements CFG construction from an AST.
 ///   The builder is stateful: an instance of the builder should be used to only
@@ -607,7 +606,7 @@ public:
   }
 
 };
-
+} // end anonymous namespace
 
 /// createBlock - Constructs and adds a new CFGBlock to the CFG.  The
 ///  block has no successors or predecessors.  If this is the first block