[cfe-commits] r54626 - in /cfe/trunk: include/clang/Parse/DeclSpec.h lib/Parse/DeclSpec.cpp lib/Parse/ParseDecl.cpp lib/Parse/Parser.cpp lib/Sema/SemaDecl.cpp lib/Sema/SemaDeclAttr.cpp lib/Sema/SemaExpr.cpp lib/Sema/SemaType.cpp

Daniel Dunbar daniel at zuster.org
Sun Aug 10 20:45:03 PDT 2008


Author: ddunbar
Date: Sun Aug 10 22:45:03 2008
New Revision: 54626

URL: http://llvm.org/viewvc/llvm-project?rev=54626&view=rev
Log:
More #include cleaning
 - Drop Diagnostic.h from DeclSpec.h, move utility Diag methods into
   implementation .cpp

Modified:
    cfe/trunk/include/clang/Parse/DeclSpec.h
    cfe/trunk/lib/Parse/DeclSpec.cpp
    cfe/trunk/lib/Parse/ParseDecl.cpp
    cfe/trunk/lib/Parse/Parser.cpp
    cfe/trunk/lib/Sema/SemaDecl.cpp
    cfe/trunk/lib/Sema/SemaDeclAttr.cpp
    cfe/trunk/lib/Sema/SemaExpr.cpp
    cfe/trunk/lib/Sema/SemaType.cpp

Modified: cfe/trunk/include/clang/Parse/DeclSpec.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Parse/DeclSpec.h?rev=54626&r1=54625&r2=54626&view=diff

==============================================================================
--- cfe/trunk/include/clang/Parse/DeclSpec.h (original)
+++ cfe/trunk/include/clang/Parse/DeclSpec.h Sun Aug 10 22:45:03 2008
@@ -14,13 +14,13 @@
 #ifndef LLVM_CLANG_PARSE_SEMADECLSPEC_H
 #define LLVM_CLANG_PARSE_SEMADECLSPEC_H
 
-#include "clang/Basic/Diagnostic.h"
 #include "clang/Parse/Action.h"
 #include "clang/Parse/AttributeList.h"
 #include "llvm/ADT/SmallVector.h"
 
 namespace clang {
   struct LangOptions;
+  class Diagnostic;
   class IdentifierInfo;
   
 /// DeclSpec - This class captures information about "declaration specifiers",
@@ -303,14 +303,10 @@
   
 private:
   void Diag(Diagnostic &D, SourceLocation Loc, SourceManager& SrcMgr, 
-            unsigned DiagID) {
-    D.Report(FullSourceLoc(Loc,SrcMgr), DiagID);
-  }
+            unsigned DiagID);
   
   void Diag(Diagnostic &D, SourceLocation Loc, SourceManager& SrcMgr,
-            unsigned DiagID, const std::string &info) {
-    D.Report(FullSourceLoc(Loc,SrcMgr), DiagID, &info, 1);
-  }
+            unsigned DiagID, const std::string &info);
 };
 
 /// ObjCDeclSpec - This class captures information about 

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

==============================================================================
--- cfe/trunk/lib/Parse/DeclSpec.cpp (original)
+++ cfe/trunk/lib/Parse/DeclSpec.cpp Sun Aug 10 22:45:03 2008
@@ -12,6 +12,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "clang/Parse/DeclSpec.h"
+#include "clang/Basic/Diagnostic.h"
 #include "clang/Basic/LangOptions.h"
 #include "clang/Basic/SourceLocation.h"
 using namespace clang;
@@ -288,3 +289,13 @@
   
   // 'data definition has no type or storage class'?
 }
+
+void DeclSpec::Diag(Diagnostic &D, SourceLocation Loc, SourceManager& SrcMgr, 
+                    unsigned DiagID) {
+  D.Report(FullSourceLoc(Loc,SrcMgr), DiagID);
+}
+  
+void DeclSpec::Diag(Diagnostic &D, SourceLocation Loc, SourceManager& SrcMgr,
+          unsigned DiagID, const std::string &info) {
+  D.Report(FullSourceLoc(Loc,SrcMgr), DiagID, &info, 1);
+}

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

==============================================================================
--- cfe/trunk/lib/Parse/ParseDecl.cpp (original)
+++ cfe/trunk/lib/Parse/ParseDecl.cpp Sun Aug 10 22:45:03 2008
@@ -12,6 +12,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "clang/Parse/Parser.h"
+#include "clang/Basic/Diagnostic.h"
 #include "clang/Parse/DeclSpec.h"
 #include "clang/Parse/Scope.h"
 #include "llvm/ADT/SmallSet.h"

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

==============================================================================
--- cfe/trunk/lib/Parse/Parser.cpp (original)
+++ cfe/trunk/lib/Parse/Parser.cpp Sun Aug 10 22:45:03 2008
@@ -12,6 +12,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "clang/Parse/Parser.h"
+#include "clang/Basic/Diagnostic.h"
 #include "clang/Parse/DeclSpec.h"
 #include "clang/Parse/Scope.h"
 using namespace clang;

Modified: cfe/trunk/lib/Sema/SemaDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDecl.cpp?rev=54626&r1=54625&r2=54626&view=diff

==============================================================================
--- cfe/trunk/lib/Sema/SemaDecl.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDecl.cpp Sun Aug 10 22:45:03 2008
@@ -24,6 +24,7 @@
 #include "clang/AST/Type.h"
 #include "clang/Parse/DeclSpec.h"
 #include "clang/Parse/Scope.h"
+#include "clang/Basic/Diagnostic.h"
 #include "clang/Basic/LangOptions.h"
 #include "clang/Basic/TargetInfo.h"
 #include "clang/Basic/SourceManager.h"

Modified: cfe/trunk/lib/Sema/SemaDeclAttr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclAttr.cpp?rev=54626&r1=54625&r2=54626&view=diff

==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclAttr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclAttr.cpp Sun Aug 10 22:45:03 2008
@@ -13,6 +13,7 @@
 
 #include "Sema.h"
 #include "clang/AST/ASTContext.h"
+#include "clang/Basic/Diagnostic.h"
 #include "clang/Basic/TargetInfo.h"
 #include "clang/Parse/DeclSpec.h"
 #include <llvm/ADT/StringExtras.h>

Modified: cfe/trunk/lib/Sema/SemaExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExpr.cpp?rev=54626&r1=54625&r2=54626&view=diff

==============================================================================
--- cfe/trunk/lib/Sema/SemaExpr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExpr.cpp Sun Aug 10 22:45:03 2008
@@ -21,6 +21,7 @@
 #include "clang/Parse/DeclSpec.h" 
 #include "clang/Lex/Preprocessor.h"
 #include "clang/Lex/LiteralSupport.h"
+#include "clang/Basic/Diagnostic.h"
 #include "clang/Basic/SourceManager.h"
 #include "clang/Basic/TargetInfo.h"
 #include "llvm/ADT/OwningPtr.h"

Modified: cfe/trunk/lib/Sema/SemaType.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaType.cpp?rev=54626&r1=54625&r2=54626&view=diff

==============================================================================
--- cfe/trunk/lib/Sema/SemaType.cpp (original)
+++ cfe/trunk/lib/Sema/SemaType.cpp Sun Aug 10 22:45:03 2008
@@ -15,8 +15,9 @@
 #include "clang/AST/ASTContext.h"
 #include "clang/AST/Decl.h"
 #include "clang/AST/DeclObjC.h"
-#include "clang/Parse/DeclSpec.h"
+#include "clang/Basic/Diagnostic.h"
 #include "clang/Basic/LangOptions.h"
+#include "clang/Parse/DeclSpec.h"
 using namespace clang;
 
 /// ConvertDeclSpecToType - Convert the specified declspec to the appropriate





More information about the cfe-commits mailing list