]> granicus.if.org Git - clang/commitdiff
More #include cleaning
authorDaniel Dunbar <daniel@zuster.org>
Mon, 11 Aug 2008 03:45:03 +0000 (03:45 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Mon, 11 Aug 2008 03:45:03 +0000 (03:45 +0000)
 - Drop Diagnostic.h from DeclSpec.h, move utility Diag methods into
   implementation .cpp

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54626 91177308-0d34-0410-b5e6-96231b3b80d8

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

index df5109d196f7ff41d6b81b22eee857d5d77aec5c..4f53de9462de48d92b8f67ef5afe41b9f149ae2b 100644 (file)
 #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 @@ public:
   
 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 
index d97dcfac807ef76f2e0dcc92c43333e32bf8ad57..5c26ec6857c409f2947e972213cb41f746cb5b4e 100644 (file)
@@ -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 @@ void DeclSpec::Finish(Diagnostic &D, SourceManager& SrcMgr,
   
   // '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);
+}
index 5b4473ea4de5dfa5d8ca8655d3251b4dd98a7467..e5c8fe7627222513ee816b826f3c89d68237f4a2 100644 (file)
@@ -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"
index 05abfe1a77c7898a1d049328abb100d37a899419..7bd8b7b893a83a459a482e5686bd5444c120a3b2 100644 (file)
@@ -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;
index 580c949ddd1f857b8d1b3b9d001a984a044827ba..d1cbdc8eeb27d58435cfd7db0ef9ccd50d270ca6 100644 (file)
@@ -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"
index c8bc12df9f85102dd2281291e1c5a1dbae35a695..37b4e42274f4b7a07d8ff7bb00b866970fad5510 100644 (file)
@@ -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>
index f68f82b87d994a1fc8e40dfeb2649ea566c940e1..d49626c590b6f6f33132bce88775f6c990c7382e 100644 (file)
@@ -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"
index bda8932ef471e3dda5c6e6e297ebaf3257c405d8..30af618c26ea206e429301a596caf1fa4432ed64 100644 (file)
@@ -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