Browse Source

[ptr-traits] Add #includes of headers rather than forward declarations
for types which are used as pointees in PointerUnions, PointerIntPairs,
and DenseMap pointer keys.

This is part of a series of patches to allow LLVM to check for complete
pointee types when computing its pointer traits. This is absolutely
necessary to get correct (or reproducible) results for things like how
many low bits are guaranteed to be zero.

I think this is the last patch for getting Clang clean here!!!

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

Chandler Carruth 9 years ago
parent
commit
52996d2bc4

+ 1 - 0
include/clang/AST/ASTContext.h

@@ -28,6 +28,7 @@
 #include "clang/Basic/AddressSpaces.h"
 #include "clang/Basic/AddressSpaces.h"
 #include "clang/Basic/IdentifierTable.h"
 #include "clang/Basic/IdentifierTable.h"
 #include "clang/Basic/LangOptions.h"
 #include "clang/Basic/LangOptions.h"
+#include "clang/Basic/Module.h"
 #include "clang/Basic/OperatorKinds.h"
 #include "clang/Basic/OperatorKinds.h"
 #include "clang/Basic/PartialDiagnostic.h"
 #include "clang/Basic/PartialDiagnostic.h"
 #include "clang/Basic/SanitizerBlacklist.h"
 #include "clang/Basic/SanitizerBlacklist.h"

+ 1 - 1
include/clang/AST/Decl.h

@@ -21,6 +21,7 @@
 #include "clang/AST/Redeclarable.h"
 #include "clang/AST/Redeclarable.h"
 #include "clang/AST/Type.h"
 #include "clang/AST/Type.h"
 #include "clang/Basic/Linkage.h"
 #include "clang/Basic/Linkage.h"
+#include "clang/Basic/Module.h"
 #include "clang/Basic/OperatorKinds.h"
 #include "clang/Basic/OperatorKinds.h"
 #include "llvm/ADT/ArrayRef.h"
 #include "llvm/ADT/ArrayRef.h"
 #include "llvm/ADT/Optional.h"
 #include "llvm/ADT/Optional.h"
@@ -38,7 +39,6 @@ class FunctionTemplateDecl;
 class FunctionTemplateSpecializationInfo;
 class FunctionTemplateSpecializationInfo;
 class LabelStmt;
 class LabelStmt;
 class MemberSpecializationInfo;
 class MemberSpecializationInfo;
-class Module;
 class NestedNameSpecifier;
 class NestedNameSpecifier;
 class ParmVarDecl;
 class ParmVarDecl;
 class Stmt;
 class Stmt;

+ 1 - 3
include/clang/Basic/Module.h

@@ -15,6 +15,7 @@
 #ifndef LLVM_CLANG_BASIC_MODULE_H
 #ifndef LLVM_CLANG_BASIC_MODULE_H
 #define LLVM_CLANG_BASIC_MODULE_H
 #define LLVM_CLANG_BASIC_MODULE_H
 
 
+#include "clang/Basic/FileManager.h"
 #include "clang/Basic/SourceLocation.h"
 #include "clang/Basic/SourceLocation.h"
 #include "llvm/ADT/ArrayRef.h"
 #include "llvm/ADT/ArrayRef.h"
 #include "llvm/ADT/DenseSet.h"
 #include "llvm/ADT/DenseSet.h"
@@ -35,9 +36,6 @@ namespace llvm {
 
 
 namespace clang {
 namespace clang {
   
   
-class DirectoryEntry;
-class FileEntry;
-class FileManager;
 class LangOptions;
 class LangOptions;
 class TargetInfo;
 class TargetInfo;
 class IdentifierInfo;
 class IdentifierInfo;

+ 1 - 1
include/clang/Serialization/Module.h

@@ -15,6 +15,7 @@
 #ifndef LLVM_CLANG_SERIALIZATION_MODULE_H
 #ifndef LLVM_CLANG_SERIALIZATION_MODULE_H
 #define LLVM_CLANG_SERIALIZATION_MODULE_H
 #define LLVM_CLANG_SERIALIZATION_MODULE_H
 
 
+#include "clang/Basic/FileManager.h"
 #include "clang/Basic/SourceLocation.h"
 #include "clang/Basic/SourceLocation.h"
 #include "clang/Serialization/ASTBitCodes.h"
 #include "clang/Serialization/ASTBitCodes.h"
 #include "clang/Serialization/ContinuousRangeMap.h"
 #include "clang/Serialization/ContinuousRangeMap.h"
@@ -32,7 +33,6 @@ template <typename Info> class OnDiskIterableChainedHashTable;
 
 
 namespace clang {
 namespace clang {
 
 
-class FileEntry;
 class DeclContext;
 class DeclContext;
 class Module;
 class Module;
 
 

+ 1 - 1
include/clang/StaticAnalyzer/Core/PathSensitive/FunctionSummary.h

@@ -14,6 +14,7 @@
 #ifndef LLVM_CLANG_STATICANALYZER_CORE_PATHSENSITIVE_FUNCTIONSUMMARY_H
 #ifndef LLVM_CLANG_STATICANALYZER_CORE_PATHSENSITIVE_FUNCTIONSUMMARY_H
 #define LLVM_CLANG_STATICANALYZER_CORE_PATHSENSITIVE_FUNCTIONSUMMARY_H
 #define LLVM_CLANG_STATICANALYZER_CORE_PATHSENSITIVE_FUNCTIONSUMMARY_H
 
 
+#include "clang/AST/Decl.h"
 #include "clang/Basic/LLVM.h"
 #include "clang/Basic/LLVM.h"
 #include "llvm/ADT/DenseMap.h"
 #include "llvm/ADT/DenseMap.h"
 #include "llvm/ADT/DenseSet.h"
 #include "llvm/ADT/DenseSet.h"
@@ -22,7 +23,6 @@
 #include <deque>
 #include <deque>
 
 
 namespace clang {
 namespace clang {
-class Decl;
 
 
 namespace ento {
 namespace ento {
 typedef std::deque<Decl*> SetOfDecls;
 typedef std::deque<Decl*> SetOfDecls;

+ 1 - 0
include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h

@@ -19,6 +19,7 @@
 #include "clang/AST/ASTContext.h"
 #include "clang/AST/ASTContext.h"
 #include "clang/AST/CharUnits.h"
 #include "clang/AST/CharUnits.h"
 #include "clang/AST/Decl.h"
 #include "clang/AST/Decl.h"
+#include "clang/AST/DeclCXX.h"
 #include "clang/AST/ExprObjC.h"
 #include "clang/AST/ExprObjC.h"
 #include "clang/Basic/LLVM.h"
 #include "clang/Basic/LLVM.h"
 #include "clang/StaticAnalyzer/Core/PathSensitive/SVals.h"
 #include "clang/StaticAnalyzer/Core/PathSensitive/SVals.h"

+ 1 - 0
lib/AST/ASTContext.cpp

@@ -19,6 +19,7 @@
 #include "clang/AST/Comment.h"
 #include "clang/AST/Comment.h"
 #include "clang/AST/CommentCommandTraits.h"
 #include "clang/AST/CommentCommandTraits.h"
 #include "clang/AST/DeclCXX.h"
 #include "clang/AST/DeclCXX.h"
+#include "clang/AST/DeclContextInternals.h"
 #include "clang/AST/DeclObjC.h"
 #include "clang/AST/DeclObjC.h"
 #include "clang/AST/DeclTemplate.h"
 #include "clang/AST/DeclTemplate.h"
 #include "clang/AST/Expr.h"
 #include "clang/AST/Expr.h"

+ 1 - 0
lib/Frontend/InitHeaderSearch.cpp

@@ -15,6 +15,7 @@
 #include "clang/Basic/FileManager.h"
 #include "clang/Basic/FileManager.h"
 #include "clang/Basic/LangOptions.h"
 #include "clang/Basic/LangOptions.h"
 #include "clang/Config/config.h" // C_INCLUDE_DIRS
 #include "clang/Config/config.h" // C_INCLUDE_DIRS
+#include "clang/Lex/HeaderMap.h"
 #include "clang/Lex/HeaderSearch.h"
 #include "clang/Lex/HeaderSearch.h"
 #include "clang/Lex/HeaderSearchOptions.h"
 #include "clang/Lex/HeaderSearchOptions.h"
 #include "llvm/ADT/SmallPtrSet.h"
 #include "llvm/ADT/SmallPtrSet.h"