[cfe-commits] r91008 - in /cfe/trunk/lib/Parse: ExtensionRAIIObject.h ParseDecl.cpp ParseDeclCXX.cpp ParseExpr.cpp ParseStmt.cpp Parser.cpp RAIIObjectsForParser.h

Chris Lattner sabre at nondot.org
Wed Dec 9 16:21:05 PST 2009


Author: lattner
Date: Wed Dec  9 18:21:05 2009
New Revision: 91008

URL: http://llvm.org/viewvc/llvm-project?rev=91008&view=rev
Log:
rename ExtensionRAIIObject.h -> RAIIObjectsForParser.h

Added:
    cfe/trunk/lib/Parse/RAIIObjectsForParser.h
      - copied, changed from r91005, cfe/trunk/lib/Parse/ExtensionRAIIObject.h
Removed:
    cfe/trunk/lib/Parse/ExtensionRAIIObject.h
Modified:
    cfe/trunk/lib/Parse/ParseDecl.cpp
    cfe/trunk/lib/Parse/ParseDeclCXX.cpp
    cfe/trunk/lib/Parse/ParseExpr.cpp
    cfe/trunk/lib/Parse/ParseStmt.cpp
    cfe/trunk/lib/Parse/Parser.cpp

Removed: cfe/trunk/lib/Parse/ExtensionRAIIObject.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ExtensionRAIIObject.h?rev=91007&view=auto

==============================================================================
--- cfe/trunk/lib/Parse/ExtensionRAIIObject.h (original)
+++ cfe/trunk/lib/Parse/ExtensionRAIIObject.h (removed)
@@ -1,40 +0,0 @@
-//===--- ExtensionRAIIObject.h - Use RAII for __extension__ -----*- C++ -*-===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-//  This file defines and implements the ExtensionRAIIObject class.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_CLANG_PARSE_EXTENSION_RAII_OBJECT_H
-#define LLVM_CLANG_PARSE_EXTENSION_RAII_OBJECT_H
-
-#include "clang/Parse/ParseDiagnostic.h"
-
-namespace clang {
-
-  /// ExtensionRAIIObject - This saves the state of extension warnings when
-  /// constructed and disables them.  When destructed, it restores them back to
-  /// the way they used to be.  This is used to handle __extension__ in the
-  /// parser.
-  class ExtensionRAIIObject {
-    void operator=(const ExtensionRAIIObject &);     // DO NOT IMPLEMENT
-    ExtensionRAIIObject(const ExtensionRAIIObject&); // DO NOT IMPLEMENT
-    Diagnostic &Diags;
-  public:
-    ExtensionRAIIObject(Diagnostic &diags) : Diags(diags) {
-      Diags.IncrementAllExtensionsSilenced();
-    }
-
-    ~ExtensionRAIIObject() {
-      Diags.DecrementAllExtensionsSilenced();
-    }
-  };
-}
-
-#endif

Modified: cfe/trunk/lib/Parse/ParseDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseDecl.cpp?rev=91008&r1=91007&r2=91008&view=diff

==============================================================================
--- cfe/trunk/lib/Parse/ParseDecl.cpp (original)
+++ cfe/trunk/lib/Parse/ParseDecl.cpp Wed Dec  9 18:21:05 2009
@@ -16,7 +16,7 @@
 #include "clang/Parse/ParseDiagnostic.h"
 #include "clang/Parse/Scope.h"
 #include "clang/Parse/Template.h"
-#include "ExtensionRAIIObject.h"
+#include "RAIIObjectsForParser.h"
 #include "llvm/ADT/SmallSet.h"
 using namespace clang;
 

Modified: cfe/trunk/lib/Parse/ParseDeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseDeclCXX.cpp?rev=91008&r1=91007&r2=91008&view=diff

==============================================================================
--- cfe/trunk/lib/Parse/ParseDeclCXX.cpp (original)
+++ cfe/trunk/lib/Parse/ParseDeclCXX.cpp Wed Dec  9 18:21:05 2009
@@ -17,7 +17,7 @@
 #include "clang/Parse/DeclSpec.h"
 #include "clang/Parse/Scope.h"
 #include "clang/Parse/Template.h"
-#include "ExtensionRAIIObject.h"
+#include "RAIIObjectsForParser.h"
 using namespace clang;
 
 /// ParseNamespace - We know that the current token is a namespace keyword. This

Modified: cfe/trunk/lib/Parse/ParseExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseExpr.cpp?rev=91008&r1=91007&r2=91008&view=diff

==============================================================================
--- cfe/trunk/lib/Parse/ParseExpr.cpp (original)
+++ cfe/trunk/lib/Parse/ParseExpr.cpp Wed Dec  9 18:21:05 2009
@@ -23,7 +23,7 @@
 #include "clang/Parse/DeclSpec.h"
 #include "clang/Parse/Scope.h"
 #include "clang/Basic/PrettyStackTrace.h"
-#include "ExtensionRAIIObject.h"
+#include "RAIIObjectsForParser.h"
 #include "llvm/ADT/SmallVector.h"
 #include "llvm/ADT/SmallString.h"
 using namespace clang;

Modified: cfe/trunk/lib/Parse/ParseStmt.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseStmt.cpp?rev=91008&r1=91007&r2=91008&view=diff

==============================================================================
--- cfe/trunk/lib/Parse/ParseStmt.cpp (original)
+++ cfe/trunk/lib/Parse/ParseStmt.cpp Wed Dec  9 18:21:05 2009
@@ -13,7 +13,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "clang/Parse/Parser.h"
-#include "ExtensionRAIIObject.h"
+#include "RAIIObjectsForParser.h"
 #include "clang/Parse/DeclSpec.h"
 #include "clang/Parse/Scope.h"
 #include "clang/Basic/Diagnostic.h"

Modified: cfe/trunk/lib/Parse/Parser.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/Parser.cpp?rev=91008&r1=91007&r2=91008&view=diff

==============================================================================
--- cfe/trunk/lib/Parse/Parser.cpp (original)
+++ cfe/trunk/lib/Parse/Parser.cpp Wed Dec  9 18:21:05 2009
@@ -17,7 +17,7 @@
 #include "clang/Parse/Scope.h"
 #include "clang/Parse/Template.h"
 #include "llvm/Support/raw_ostream.h"
-#include "ExtensionRAIIObject.h"
+#include "RAIIObjectsForParser.h"
 #include "ParsePragma.h"
 using namespace clang;
 

Copied: cfe/trunk/lib/Parse/RAIIObjectsForParser.h (from r91005, cfe/trunk/lib/Parse/ExtensionRAIIObject.h)
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/RAIIObjectsForParser.h?p2=cfe/trunk/lib/Parse/RAIIObjectsForParser.h&p1=cfe/trunk/lib/Parse/ExtensionRAIIObject.h&r1=91005&r2=91008&rev=91008&view=diff

==============================================================================
--- cfe/trunk/lib/Parse/ExtensionRAIIObject.h (original)
+++ cfe/trunk/lib/Parse/RAIIObjectsForParser.h Wed Dec  9 18:21:05 2009
@@ -1,4 +1,4 @@
-//===--- ExtensionRAIIObject.h - Use RAII for __extension__ -----*- C++ -*-===//
+//===--- RAIIObjectsForParser.h - RAII helpers for the parser ---*- C++ -*-===//
 //
 //                     The LLVM Compiler Infrastructure
 //
@@ -7,12 +7,13 @@
 //
 //===----------------------------------------------------------------------===//
 //
-//  This file defines and implements the ExtensionRAIIObject class.
+// This file defines and implements the some simple RAII objects that are used
+// by the parser to manage bits in recursion.
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLVM_CLANG_PARSE_EXTENSION_RAII_OBJECT_H
-#define LLVM_CLANG_PARSE_EXTENSION_RAII_OBJECT_H
+#ifndef LLVM_CLANG_PARSE_RAII_OBJECTS_FOR_PARSER_H
+#define LLVM_CLANG_PARSE_RAII_OBJECTS_FOR_PARSER_H
 
 #include "clang/Parse/ParseDiagnostic.h"
 





More information about the cfe-commits mailing list