Don't include Type.h in DeclarationName.h.
Recursively prune some includes. llvm-svn: 169094
This commit is contained in:
parent
8b44da58f7
commit
d7d2b1fe45
|
@ -16,33 +16,34 @@
|
|||
|
||||
#include "clang/AST/APValue.h"
|
||||
#include "clang/AST/DeclBase.h"
|
||||
#include "clang/AST/Redeclarable.h"
|
||||
#include "clang/AST/DeclarationName.h"
|
||||
#include "clang/AST/ExternalASTSource.h"
|
||||
#include "clang/AST/Redeclarable.h"
|
||||
#include "clang/AST/Type.h"
|
||||
#include "clang/Basic/Linkage.h"
|
||||
#include "llvm/ADT/ArrayRef.h"
|
||||
#include "llvm/ADT/Optional.h"
|
||||
#include "llvm/Support/Compiler.h"
|
||||
|
||||
namespace clang {
|
||||
struct ASTTemplateArgumentListInfo;
|
||||
class CXXTemporary;
|
||||
class CompoundStmt;
|
||||
class DependentFunctionTemplateSpecializationInfo;
|
||||
class Expr;
|
||||
class FunctionTemplateDecl;
|
||||
class Stmt;
|
||||
class CompoundStmt;
|
||||
class StringLiteral;
|
||||
class NestedNameSpecifier;
|
||||
class TemplateParameterList;
|
||||
class TemplateArgumentList;
|
||||
struct ASTTemplateArgumentListInfo;
|
||||
class MemberSpecializationInfo;
|
||||
class FunctionTemplateSpecializationInfo;
|
||||
class DependentFunctionTemplateSpecializationInfo;
|
||||
class LabelStmt;
|
||||
class MemberSpecializationInfo;
|
||||
class Module;
|
||||
class NestedNameSpecifier;
|
||||
class Stmt;
|
||||
class StringLiteral;
|
||||
class TemplateArgumentList;
|
||||
class TemplateParameterList;
|
||||
class TypeLoc;
|
||||
class UnresolvedSetImpl;
|
||||
class LabelStmt;
|
||||
class Module;
|
||||
|
||||
|
||||
/// \brief A container of type source information.
|
||||
///
|
||||
/// A client can read the relevant info using TypeLoc wrappers, e.g:
|
||||
|
|
|
@ -16,36 +16,37 @@
|
|||
|
||||
#include "clang/AST/AttrIterator.h"
|
||||
#include "clang/AST/DeclarationName.h"
|
||||
#include "clang/AST/Type.h"
|
||||
#include "clang/Basic/Specifiers.h"
|
||||
#include "llvm/ADT/PointerUnion.h"
|
||||
#include "llvm/Support/Compiler.h"
|
||||
#include "llvm/Support/PrettyStackTrace.h"
|
||||
|
||||
namespace clang {
|
||||
class DeclContext;
|
||||
class TranslationUnitDecl;
|
||||
class NamespaceDecl;
|
||||
class UsingDirectiveDecl;
|
||||
class NamedDecl;
|
||||
class FunctionDecl;
|
||||
class CXXRecordDecl;
|
||||
class EnumDecl;
|
||||
class ObjCMethodDecl;
|
||||
class ObjCContainerDecl;
|
||||
class ObjCInterfaceDecl;
|
||||
class ObjCCategoryDecl;
|
||||
class ObjCProtocolDecl;
|
||||
class ObjCImplementationDecl;
|
||||
class ObjCCategoryImplDecl;
|
||||
class ObjCImplDecl;
|
||||
class LinkageSpecDecl;
|
||||
class BlockDecl;
|
||||
class DeclarationName;
|
||||
class CompoundStmt;
|
||||
class StoredDeclsMap;
|
||||
class DependentDiagnostic;
|
||||
class ASTMutationListener;
|
||||
class BlockDecl;
|
||||
class CXXRecordDecl;
|
||||
class CompoundStmt;
|
||||
class DeclContext;
|
||||
class DeclarationName;
|
||||
class DependentDiagnostic;
|
||||
class EnumDecl;
|
||||
class FunctionDecl;
|
||||
class LinkageSpecDecl;
|
||||
class NamedDecl;
|
||||
class NamespaceDecl;
|
||||
class ObjCCategoryDecl;
|
||||
class ObjCCategoryImplDecl;
|
||||
class ObjCContainerDecl;
|
||||
class ObjCImplDecl;
|
||||
class ObjCImplementationDecl;
|
||||
class ObjCInterfaceDecl;
|
||||
class ObjCMethodDecl;
|
||||
class ObjCProtocolDecl;
|
||||
struct PrintingPolicy;
|
||||
class Stmt;
|
||||
class StoredDeclsMap;
|
||||
class TranslationUnitDecl;
|
||||
class UsingDirectiveDecl;
|
||||
}
|
||||
|
||||
namespace llvm {
|
||||
|
|
|
@ -14,8 +14,6 @@
|
|||
#define LLVM_CLANG_AST_DECLARATIONNAME_H
|
||||
|
||||
#include "clang/Basic/IdentifierTable.h"
|
||||
#include "clang/AST/Type.h"
|
||||
#include "clang/AST/CanonicalType.h"
|
||||
#include "clang/Basic/PartialDiagnostic.h"
|
||||
#include "llvm/Support/Compiler.h"
|
||||
|
||||
|
@ -24,14 +22,20 @@ namespace llvm {
|
|||
}
|
||||
|
||||
namespace clang {
|
||||
class CXXSpecialName;
|
||||
class CXXOperatorIdName;
|
||||
class ASTContext;
|
||||
class CXXLiteralOperatorIdName;
|
||||
class CXXOperatorIdName;
|
||||
class CXXSpecialName;
|
||||
class DeclarationNameExtra;
|
||||
class IdentifierInfo;
|
||||
class MultiKeywordSelector;
|
||||
class UsingDirectiveDecl;
|
||||
class QualType;
|
||||
class Type;
|
||||
class TypeSourceInfo;
|
||||
class UsingDirectiveDecl;
|
||||
|
||||
template <typename> class CanQual;
|
||||
typedef CanQual<Type> CanQualType;
|
||||
|
||||
/// DeclarationName - The name of a declaration. In the common case,
|
||||
/// this just stores an IdentifierInfo pointer to a normal
|
||||
|
@ -349,23 +353,15 @@ public:
|
|||
|
||||
/// getCXXConstructorName - Returns the name of a C++ constructor
|
||||
/// for the given Type.
|
||||
DeclarationName getCXXConstructorName(CanQualType Ty) {
|
||||
return getCXXSpecialName(DeclarationName::CXXConstructorName,
|
||||
Ty.getUnqualifiedType());
|
||||
}
|
||||
DeclarationName getCXXConstructorName(CanQualType Ty);
|
||||
|
||||
/// getCXXDestructorName - Returns the name of a C++ destructor
|
||||
/// for the given Type.
|
||||
DeclarationName getCXXDestructorName(CanQualType Ty) {
|
||||
return getCXXSpecialName(DeclarationName::CXXDestructorName,
|
||||
Ty.getUnqualifiedType());
|
||||
}
|
||||
DeclarationName getCXXDestructorName(CanQualType Ty);
|
||||
|
||||
/// getCXXConversionFunctionName - Returns the name of a C++
|
||||
/// conversion function for the given Type.
|
||||
DeclarationName getCXXConversionFunctionName(CanQualType Ty) {
|
||||
return getCXXSpecialName(DeclarationName::CXXConversionFunctionName, Ty);
|
||||
}
|
||||
DeclarationName getCXXConversionFunctionName(CanQualType Ty);
|
||||
|
||||
/// getCXXSpecialName - Returns a declaration name for special kind
|
||||
/// of C++ name, e.g., for a constructor, destructor, or conversion
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
#include "clang/AST/OperationKinds.h"
|
||||
#include "clang/AST/ASTVector.h"
|
||||
#include "clang/AST/TemplateBase.h"
|
||||
#include "clang/Basic/TargetInfo.h"
|
||||
#include "clang/Basic/TypeTraits.h"
|
||||
#include "llvm/ADT/APSInt.h"
|
||||
#include "llvm/ADT/APFloat.h"
|
||||
|
@ -32,21 +31,22 @@
|
|||
#include <cctype>
|
||||
|
||||
namespace clang {
|
||||
class ASTContext;
|
||||
class APValue;
|
||||
class ASTContext;
|
||||
class BlockDecl;
|
||||
class CXXBaseSpecifier;
|
||||
class CXXMemberCallExpr;
|
||||
class CXXOperatorCallExpr;
|
||||
class CastExpr;
|
||||
class Decl;
|
||||
class IdentifierInfo;
|
||||
class ParmVarDecl;
|
||||
class NamedDecl;
|
||||
class ValueDecl;
|
||||
class BlockDecl;
|
||||
class CXXBaseSpecifier;
|
||||
class CXXOperatorCallExpr;
|
||||
class MaterializeTemporaryExpr;
|
||||
class CXXMemberCallExpr;
|
||||
class NamedDecl;
|
||||
class ObjCPropertyRefExpr;
|
||||
class OpaqueValueExpr;
|
||||
class ParmVarDecl;
|
||||
class TargetInfo;
|
||||
class ValueDecl;
|
||||
|
||||
/// \brief A simple array of base specifiers.
|
||||
typedef SmallVector<CXXBaseSpecifier*, 4> CXXCastPath;
|
||||
|
|
|
@ -24,7 +24,9 @@ class ASTConsumer;
|
|||
class CXXBaseSpecifier;
|
||||
class DeclarationName;
|
||||
class ExternalSemaSource; // layering violation required for downcasting
|
||||
class FieldDecl;
|
||||
class NamedDecl;
|
||||
class RecordDecl;
|
||||
class Selector;
|
||||
class Stmt;
|
||||
class TagDecl;
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
|
||||
#include "clang/AST/ASTContext.h"
|
||||
#include "clang/AST/Expr.h"
|
||||
#include "clang/AST/ExprCXX.h"
|
||||
#include "clang/AST/ExprObjC.h"
|
||||
#include "clang/StaticAnalyzer/Core/PathSensitive/SVals.h"
|
||||
#include "clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h"
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "clang/Basic/SourceManager.h"
|
||||
#include "clang/Lex/Lexer.h"
|
||||
#include "clang/Sema/SemaDiagnostic.h"
|
||||
#include "llvm/ADT/StringSwitch.h"
|
||||
|
||||
using namespace clang;
|
||||
using namespace arcmt;
|
||||
|
|
|
@ -14,11 +14,12 @@
|
|||
#include "clang/AST/RecursiveASTVisitor.h"
|
||||
#include "clang/AST/StmtVisitor.h"
|
||||
#include "clang/Basic/SourceManager.h"
|
||||
#include "clang/Basic/TargetInfo.h"
|
||||
#include "clang/Lex/Lexer.h"
|
||||
#include "clang/Sema/Sema.h"
|
||||
#include "clang/Sema/SemaDiagnostic.h"
|
||||
#include "llvm/ADT/StringSwitch.h"
|
||||
#include "llvm/ADT/DenseSet.h"
|
||||
#include "llvm/ADT/StringSwitch.h"
|
||||
#include <map>
|
||||
|
||||
using namespace clang;
|
||||
|
|
|
@ -364,6 +364,21 @@ DeclarationNameTable::~DeclarationNameTable() {
|
|||
delete LiteralNames;
|
||||
}
|
||||
|
||||
DeclarationName DeclarationNameTable::getCXXConstructorName(CanQualType Ty) {
|
||||
return getCXXSpecialName(DeclarationName::CXXConstructorName,
|
||||
Ty.getUnqualifiedType());
|
||||
}
|
||||
|
||||
DeclarationName DeclarationNameTable::getCXXDestructorName(CanQualType Ty) {
|
||||
return getCXXSpecialName(DeclarationName::CXXDestructorName,
|
||||
Ty.getUnqualifiedType());
|
||||
}
|
||||
|
||||
DeclarationName
|
||||
DeclarationNameTable::getCXXConversionFunctionName(CanQualType Ty) {
|
||||
return getCXXSpecialName(DeclarationName::CXXConversionFunctionName, Ty);
|
||||
}
|
||||
|
||||
DeclarationName
|
||||
DeclarationNameTable::getCXXSpecialName(DeclarationName::NameKind Kind,
|
||||
CanQualType Ty) {
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
|
||||
#include "clang/Parse/Parser.h"
|
||||
#include "clang/Parse/ParseDiagnostic.h"
|
||||
#include "clang/Basic/AddressSpaces.h"
|
||||
#include "clang/Basic/OpenCL.h"
|
||||
#include "clang/Sema/Lookup.h"
|
||||
#include "clang/Sema/Scope.h"
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
#include "clang/Basic/Diagnostic.h"
|
||||
#include "clang/Basic/IdentifierTable.h"
|
||||
#include "clang/Basic/SourceManager.h"
|
||||
#include "clang/Basic/TargetInfo.h"
|
||||
#include "clang/Lex/Lexer.h"
|
||||
#include "llvm/ADT/DenseSet.h"
|
||||
#include "llvm/ADT/OwningPtr.h"
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include "clang/StaticAnalyzer/Core/Checker.h"
|
||||
#include "clang/StaticAnalyzer/Core/BugReporter/BugType.h"
|
||||
#include "clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h"
|
||||
#include "llvm/ADT/StringSwitch.h"
|
||||
|
||||
using namespace clang;
|
||||
using namespace ento;
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
#include "clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h"
|
||||
#include "clang/StaticAnalyzer/Core/BugReporter/BugType.h"
|
||||
#include "clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h"
|
||||
#include "clang/AST/ExprCXX.h"
|
||||
#include "clang/Basic/SourceManager.h"
|
||||
#include "llvm/ADT/SmallString.h"
|
||||
using namespace clang;
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "clang/AST/ExprCXX.h"
|
||||
#include "clang/StaticAnalyzer/Core/CheckerManager.h"
|
||||
#include "clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h"
|
||||
|
||||
|
|
Loading…
Reference in New Issue