More #include cleaning

- Drop Diagnostic.h from DeclSpec.h, move utility Diag methods into
   implementation .cpp

llvm-svn: 54626
This commit is contained in:
Daniel Dunbar 2008-08-11 03:45:03 +00:00
parent 34fb67272c
commit c74b5cc2bc
8 changed files with 21 additions and 8 deletions

View File

@ -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 @@ 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

View 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);
}

View 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"

View 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;

View 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"

View 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>

View 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"

View 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