[clang] ac2090d - [clang] Remove unused forward declarations (NFC)

Kazu Hirata via cfe-commits cfe-commits at lists.llvm.org
Sun Jan 9 12:21:19 PST 2022


Author: Kazu Hirata
Date: 2022-01-09T12:21:00-08:00
New Revision: ac2090d507a67d1e98594d081ce3951837d43f28

URL: https://github.com/llvm/llvm-project/commit/ac2090d507a67d1e98594d081ce3951837d43f28
DIFF: https://github.com/llvm/llvm-project/commit/ac2090d507a67d1e98594d081ce3951837d43f28.diff

LOG: [clang] Remove unused forward declarations (NFC)

Added: 
    

Modified: 
    clang/include/clang/AST/ASTConcept.h
    clang/include/clang/AST/ASTContext.h
    clang/include/clang/AST/ASTImporterLookupTable.h
    clang/include/clang/AST/Attr.h
    clang/include/clang/AST/AttrIterator.h
    clang/include/clang/AST/Decl.h
    clang/include/clang/AST/DeclBase.h
    clang/include/clang/AST/DeclCXX.h
    clang/include/clang/AST/DeclarationName.h
    clang/include/clang/AST/MangleNumberingContext.h
    clang/include/clang/AST/PrettyDeclStackTrace.h
    clang/include/clang/AST/PrettyPrinter.h
    clang/include/clang/AST/TemplateBase.h
    clang/include/clang/AST/TemplateName.h
    clang/include/clang/Analysis/Analyses/CalledOnceCheck.h
    clang/include/clang/Analysis/BodyFarm.h
    clang/include/clang/Analysis/PathDiagnostic.h
    clang/include/clang/Analysis/ProgramPoint.h
    clang/include/clang/Basic/PartialDiagnostic.h
    clang/include/clang/Basic/ProfileList.h
    clang/include/clang/Basic/TargetInfo.h
    clang/include/clang/CodeGen/CodeGenABITypes.h
    clang/include/clang/CodeGen/SwiftCallingConv.h
    clang/include/clang/Driver/Util.h
    clang/include/clang/Format/Format.h
    clang/include/clang/Frontend/ASTConsumers.h
    clang/include/clang/Frontend/CompilerInstance.h
    clang/include/clang/Frontend/FrontendActions.h
    clang/include/clang/Frontend/SerializedDiagnosticPrinter.h
    clang/include/clang/Interpreter/Interpreter.h
    clang/include/clang/Sema/AnalysisBasedWarnings.h
    clang/include/clang/Sema/ExternalSemaSource.h
    clang/include/clang/Sema/Initialization.h
    clang/include/clang/Sema/ScopeInfo.h
    clang/include/clang/Serialization/ASTReader.h
    clang/include/clang/Serialization/ASTWriter.h
    clang/include/clang/Serialization/GlobalModuleIndex.h
    clang/include/clang/Serialization/PCHContainerOperations.h
    clang/include/clang/StaticAnalyzer/Checkers/BuiltinCheckerRegistration.h
    clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h
    clang/include/clang/StaticAnalyzer/Core/BugReporter/BugType.h
    clang/include/clang/StaticAnalyzer/Core/CheckerManager.h
    clang/include/clang/StaticAnalyzer/Core/PathDiagnosticConsumers.h
    clang/include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h
    clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h
    clang/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerHelpers.h
    clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
    clang/include/clang/StaticAnalyzer/Core/PathSensitive/LoopUnrolling.h
    clang/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h
    clang/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h
    clang/include/clang/StaticAnalyzer/Frontend/AnalysisConsumer.h
    clang/include/clang/StaticAnalyzer/Frontend/FrontendActions.h
    clang/include/clang/Tooling/ASTDiff/ASTDiffInternal.h
    clang/include/clang/Tooling/Refactoring/Rename/RenamingAction.h
    clang/include/clang/Tooling/Refactoring/Rename/USRFindingAction.h
    clang/include/clang/Tooling/Tooling.h
    clang/tools/libclang/CXType.h

Removed: 
    


################################################################################
diff  --git a/clang/include/clang/AST/ASTConcept.h b/clang/include/clang/AST/ASTConcept.h
index c8a1dc83b8aae..25e00860060f0 100644
--- a/clang/include/clang/AST/ASTConcept.h
+++ b/clang/include/clang/AST/ASTConcept.h
@@ -22,7 +22,6 @@
 
 namespace clang {
 class ConceptDecl;
-class ConceptSpecializationExpr;
 
 /// The result of a constraint satisfaction check, containing the necessary
 /// information to diagnose an unsatisfied constraint.

diff  --git a/clang/include/clang/AST/ASTContext.h b/clang/include/clang/AST/ASTContext.h
index 63f2c948c79bb..7a9e3a643d6f4 100644
--- a/clang/include/clang/AST/ASTContext.h
+++ b/clang/include/clang/AST/ASTContext.h
@@ -104,10 +104,8 @@ class DynTypedNodeList;
 class Expr;
 enum class FloatModeKind;
 class GlobalDecl;
-class ItaniumMangleContext;
 class MangleContext;
 class MangleNumberingContext;
-class MaterializeTemporaryExpr;
 class MemberSpecializationInfo;
 class Module;
 struct MSGuidDeclParts;
@@ -126,7 +124,6 @@ class ObjCTypeParamDecl;
 class OMPTraitInfo;
 struct ParsedTargetAttr;
 class Preprocessor;
-class Stmt;
 class StoredDeclsMap;
 class TargetAttr;
 class TargetInfo;

diff  --git a/clang/include/clang/AST/ASTImporterLookupTable.h b/clang/include/clang/AST/ASTImporterLookupTable.h
index 918c2b9e350cd..2dbc44c5dcd44 100644
--- a/clang/include/clang/AST/ASTImporterLookupTable.h
+++ b/clang/include/clang/AST/ASTImporterLookupTable.h
@@ -21,7 +21,6 @@
 
 namespace clang {
 
-class ASTContext;
 class NamedDecl;
 class DeclContext;
 

diff  --git a/clang/include/clang/AST/Attr.h b/clang/include/clang/AST/Attr.h
index 6366d6e8837ef..070e160d65170 100644
--- a/clang/include/clang/AST/Attr.h
+++ b/clang/include/clang/AST/Attr.h
@@ -34,12 +34,7 @@
 namespace clang {
 class ASTContext;
 class AttributeCommonInfo;
-class IdentifierInfo;
-class ObjCInterfaceDecl;
-class Expr;
-class QualType;
 class FunctionDecl;
-class TypeSourceInfo;
 class OMPTraitInfo;
 
 /// Attr - This represents one attribute.

diff  --git a/clang/include/clang/AST/AttrIterator.h b/clang/include/clang/AST/AttrIterator.h
index 78ce9314a2bba..66571e1cf0b8e 100644
--- a/clang/include/clang/AST/AttrIterator.h
+++ b/clang/include/clang/AST/AttrIterator.h
@@ -22,7 +22,6 @@
 
 namespace clang {
 
-class ASTContext;
 class Attr;
 
 /// AttrVec - A vector of Attr, which is how they are stored on the AST.

diff  --git a/clang/include/clang/AST/Decl.h b/clang/include/clang/AST/Decl.h
index 2eacf1105c18c..862e8899d2751 100644
--- a/clang/include/clang/AST/Decl.h
+++ b/clang/include/clang/AST/Decl.h
@@ -53,7 +53,6 @@ namespace clang {
 
 class ASTContext;
 struct ASTTemplateArgumentListInfo;
-class Attr;
 class CompoundStmt;
 class DependentFunctionTemplateSpecializationInfo;
 class EnumDecl;
@@ -74,7 +73,6 @@ class TemplateArgumentList;
 class TemplateArgumentListInfo;
 class TemplateParameterList;
 class TypeAliasTemplateDecl;
-class TypeLoc;
 class UnresolvedSetImpl;
 class VarTemplateDecl;
 

diff  --git a/clang/include/clang/AST/DeclBase.h b/clang/include/clang/AST/DeclBase.h
index 2a0a19597391f..1328d377d00fa 100644
--- a/clang/include/clang/AST/DeclBase.h
+++ b/clang/include/clang/AST/DeclBase.h
@@ -52,14 +52,8 @@ enum Linkage : unsigned char;
 class LinkageSpecDecl;
 class Module;
 class NamedDecl;
-class ObjCCategoryDecl;
-class ObjCCategoryImplDecl;
 class ObjCContainerDecl;
-class ObjCImplDecl;
-class ObjCImplementationDecl;
-class ObjCInterfaceDecl;
 class ObjCMethodDecl;
-class ObjCProtocolDecl;
 struct PrintingPolicy;
 class RecordDecl;
 class SourceManager;

diff  --git a/clang/include/clang/AST/DeclCXX.h b/clang/include/clang/AST/DeclCXX.h
index 309a60f43e4f6..b54e6b0ac2171 100644
--- a/clang/include/clang/AST/DeclCXX.h
+++ b/clang/include/clang/AST/DeclCXX.h
@@ -64,7 +64,6 @@ class CXXFinalOverriderMap;
 class CXXIndirectPrimaryBaseSet;
 class CXXMethodDecl;
 class DecompositionDecl;
-class DiagnosticBuilder;
 class FriendDecl;
 class FunctionTemplateDecl;
 class IdentifierInfo;

diff  --git a/clang/include/clang/AST/DeclarationName.h b/clang/include/clang/AST/DeclarationName.h
index 38da6fc727fbd..0762e0a478eac 100644
--- a/clang/include/clang/AST/DeclarationName.h
+++ b/clang/include/clang/AST/DeclarationName.h
@@ -34,11 +34,9 @@ class ASTContext;
 template <typename> class CanQual;
 class DeclarationName;
 class DeclarationNameTable;
-class MultiKeywordSelector;
 struct PrintingPolicy;
 class TemplateDecl;
 class TypeSourceInfo;
-class UsingDirectiveDecl;
 
 using CanQualType = CanQual<Type>;
 

diff  --git a/clang/include/clang/AST/MangleNumberingContext.h b/clang/include/clang/AST/MangleNumberingContext.h
index eb33759682d6f..a4a6ce4c2708a 100644
--- a/clang/include/clang/AST/MangleNumberingContext.h
+++ b/clang/include/clang/AST/MangleNumberingContext.h
@@ -21,9 +21,7 @@ namespace clang {
 
 class BlockDecl;
 class CXXMethodDecl;
-class IdentifierInfo;
 class TagDecl;
-class Type;
 class VarDecl;
 
 /// Keeps track of the mangled names of lambda expressions and block

diff  --git a/clang/include/clang/AST/PrettyDeclStackTrace.h b/clang/include/clang/AST/PrettyDeclStackTrace.h
index 899bbcb3be45c..82df031d4126f 100644
--- a/clang/include/clang/AST/PrettyDeclStackTrace.h
+++ b/clang/include/clang/AST/PrettyDeclStackTrace.h
@@ -22,7 +22,6 @@ namespace clang {
 
 class ASTContext;
 class Decl;
-class SourceManager;
 
 /// PrettyDeclStackTraceEntry - If a crash occurs in the parser while
 /// parsing something related to a declaration, include that

diff  --git a/clang/include/clang/AST/PrettyPrinter.h b/clang/include/clang/AST/PrettyPrinter.h
index f6816e938f2a6..01dc8e0002703 100644
--- a/clang/include/clang/AST/PrettyPrinter.h
+++ b/clang/include/clang/AST/PrettyPrinter.h
@@ -20,9 +20,7 @@ namespace clang {
 
 class DeclContext;
 class LangOptions;
-class SourceManager;
 class Stmt;
-class TagDecl;
 
 class PrinterHelper {
 public:

diff  --git a/clang/include/clang/AST/TemplateBase.h b/clang/include/clang/AST/TemplateBase.h
index fa27a12cfbb94..e8064121d2796 100644
--- a/clang/include/clang/AST/TemplateBase.h
+++ b/clang/include/clang/AST/TemplateBase.h
@@ -52,7 +52,6 @@ template <> struct PointerLikeTypeTraits<clang::Expr *> {
 namespace clang {
 
 class ASTContext;
-class DiagnosticBuilder;
 class Expr;
 struct PrintingPolicy;
 class TypeSourceInfo;

diff  --git a/clang/include/clang/AST/TemplateName.h b/clang/include/clang/AST/TemplateName.h
index 2befb5c1b45e0..44080a7f56d42 100644
--- a/clang/include/clang/AST/TemplateName.h
+++ b/clang/include/clang/AST/TemplateName.h
@@ -26,14 +26,12 @@ namespace clang {
 
 class ASTContext;
 class DependentTemplateName;
-class DiagnosticBuilder;
 class IdentifierInfo;
 class NamedDecl;
 class NestedNameSpecifier;
 enum OverloadedOperatorKind : int;
 class OverloadedTemplateStorage;
 class AssumedTemplateStorage;
-class PartialDiagnostic;
 struct PrintingPolicy;
 class QualifiedTemplateName;
 class SubstTemplateTemplateParmPackStorage;

diff  --git a/clang/include/clang/Analysis/Analyses/CalledOnceCheck.h b/clang/include/clang/Analysis/Analyses/CalledOnceCheck.h
index a0c767bf92d22..6d78fa4a897ad 100644
--- a/clang/include/clang/Analysis/Analyses/CalledOnceCheck.h
+++ b/clang/include/clang/Analysis/Analyses/CalledOnceCheck.h
@@ -20,7 +20,6 @@ class AnalysisDeclContext;
 class BlockDecl;
 class CFG;
 class Decl;
-class DeclContext;
 class Expr;
 class ParmVarDecl;
 class Stmt;

diff  --git a/clang/include/clang/Analysis/BodyFarm.h b/clang/include/clang/Analysis/BodyFarm.h
index 3863cc204d6cf..d947ac0702091 100644
--- a/clang/include/clang/Analysis/BodyFarm.h
+++ b/clang/include/clang/Analysis/BodyFarm.h
@@ -24,7 +24,6 @@ namespace clang {
 class ASTContext;
 class FunctionDecl;
 class ObjCMethodDecl;
-class ObjCPropertyDecl;
 class Stmt;
 class CodeInjector;
 

diff  --git a/clang/include/clang/Analysis/PathDiagnostic.h b/clang/include/clang/Analysis/PathDiagnostic.h
index 553708d9ec0cd..446f67b23e758 100644
--- a/clang/include/clang/Analysis/PathDiagnostic.h
+++ b/clang/include/clang/Analysis/PathDiagnostic.h
@@ -41,10 +41,8 @@ class AnalysisDeclContext;
 class BinaryOperator;
 class CallEnter;
 class CallExitEnd;
-class CallExpr;
 class ConditionalOperator;
 class Decl;
-class Expr;
 class LocationContext;
 class MemberExpr;
 class ProgramPoint;

diff  --git a/clang/include/clang/Analysis/ProgramPoint.h b/clang/include/clang/Analysis/ProgramPoint.h
index 546224bfd58da..680713a52f2f0 100644
--- a/clang/include/clang/Analysis/ProgramPoint.h
+++ b/clang/include/clang/Analysis/ProgramPoint.h
@@ -30,7 +30,6 @@
 namespace clang {
 
 class AnalysisDeclContext;
-class FunctionDecl;
 class LocationContext;
 
 /// ProgramPoints can be "tagged" as representing points specific to a given

diff  --git a/clang/include/clang/Basic/PartialDiagnostic.h b/clang/include/clang/Basic/PartialDiagnostic.h
index 217441979869b..d2135f5da0bd8 100644
--- a/clang/include/clang/Basic/PartialDiagnostic.h
+++ b/clang/include/clang/Basic/PartialDiagnostic.h
@@ -28,9 +28,6 @@
 
 namespace clang {
 
-class DeclContext;
-class IdentifierInfo;
-
 class PartialDiagnostic : public StreamingDiagnostic {
 private:
   // NOTE: Sema assumes that PartialDiagnostic is location-invariant

diff  --git a/clang/include/clang/Basic/ProfileList.h b/clang/include/clang/Basic/ProfileList.h
index 5b71928eb9d07..aa472f126818d 100644
--- a/clang/include/clang/Basic/ProfileList.h
+++ b/clang/include/clang/Basic/ProfileList.h
@@ -21,10 +21,6 @@
 #include "llvm/ADT/StringRef.h"
 #include <memory>
 
-namespace llvm {
-class SpecialCaseList;
-}
-
 namespace clang {
 
 class ProfileSpecialCaseList;

diff  --git a/clang/include/clang/Basic/TargetInfo.h b/clang/include/clang/Basic/TargetInfo.h
index 437feba85e238..46eb190333aa2 100644
--- a/clang/include/clang/Basic/TargetInfo.h
+++ b/clang/include/clang/Basic/TargetInfo.h
@@ -47,9 +47,6 @@ class DiagnosticsEngine;
 class LangOptions;
 class CodeGenOptions;
 class MacroBuilder;
-class QualType;
-class SourceLocation;
-class SourceManager;
 
 namespace Builtin { struct Info; }
 

diff  --git a/clang/include/clang/CodeGen/CodeGenABITypes.h b/clang/include/clang/CodeGen/CodeGenABITypes.h
index 3c745fadbe78f..fda0855dc8683 100644
--- a/clang/include/clang/CodeGen/CodeGenABITypes.h
+++ b/clang/include/clang/CodeGen/CodeGenABITypes.h
@@ -32,26 +32,18 @@
 namespace llvm {
 class AttrBuilder;
 class Constant;
-class DataLayout;
-class Module;
 class Function;
 class FunctionType;
 class Type;
 }
 
 namespace clang {
-class ASTContext;
 class CXXConstructorDecl;
 class CXXDestructorDecl;
 class CXXRecordDecl;
 class CXXMethodDecl;
-class CodeGenOptions;
-class CoverageSourceInfo;
-class DiagnosticsEngine;
-class HeaderSearchOptions;
 class ObjCMethodDecl;
 class ObjCProtocolDecl;
-class PreprocessorOptions;
 
 namespace CodeGen {
 class CGFunctionInfo;

diff  --git a/clang/include/clang/CodeGen/SwiftCallingConv.h b/clang/include/clang/CodeGen/SwiftCallingConv.h
index b1a638a58a096..d7a0c84699ab0 100644
--- a/clang/include/clang/CodeGen/SwiftCallingConv.h
+++ b/clang/include/clang/CodeGen/SwiftCallingConv.h
@@ -28,7 +28,6 @@ namespace llvm {
 }
 
 namespace clang {
-class Decl;
 class FieldDecl;
 class ASTRecordLayout;
 

diff  --git a/clang/include/clang/Driver/Util.h b/clang/include/clang/Driver/Util.h
index 6788420912a10..92d3d40433a32 100644
--- a/clang/include/clang/Driver/Util.h
+++ b/clang/include/clang/Driver/Util.h
@@ -13,7 +13,6 @@
 #include "llvm/ADT/DenseMap.h"
 
 namespace clang {
-class DiagnosticsEngine;
 
 namespace driver {
   class Action;

diff  --git a/clang/include/clang/Format/Format.h b/clang/include/clang/Format/Format.h
index 2ee6e26bde55e..fe35b4bd69c94 100644
--- a/clang/include/clang/Format/Format.h
+++ b/clang/include/clang/Format/Format.h
@@ -29,11 +29,6 @@ class FileSystem;
 } // namespace llvm
 
 namespace clang {
-
-class Lexer;
-class SourceManager;
-class DiagnosticConsumer;
-
 namespace format {
 
 enum class ParseError {

diff  --git a/clang/include/clang/Frontend/ASTConsumers.h b/clang/include/clang/Frontend/ASTConsumers.h
index 98cfc7cadc0dd..0e068bf5cccb5 100644
--- a/clang/include/clang/Frontend/ASTConsumers.h
+++ b/clang/include/clang/Frontend/ASTConsumers.h
@@ -20,12 +20,6 @@
 namespace clang {
 
 class ASTConsumer;
-class CodeGenOptions;
-class DiagnosticsEngine;
-class FileManager;
-class LangOptions;
-class Preprocessor;
-class TargetOptions;
 
 // AST pretty-printer: prints out the AST in a format that is close to the
 // original C code.  The output is intended to be in a format such that

diff  --git a/clang/include/clang/Frontend/CompilerInstance.h b/clang/include/clang/Frontend/CompilerInstance.h
index 74e152ea59520..577daad86b204 100644
--- a/clang/include/clang/Frontend/CompilerInstance.h
+++ b/clang/include/clang/Frontend/CompilerInstance.h
@@ -41,8 +41,6 @@ class ASTReader;
 class CodeCompleteConsumer;
 class DiagnosticsEngine;
 class DiagnosticConsumer;
-class ExternalASTSource;
-class FileEntry;
 class FileManager;
 class FrontendAction;
 class InMemoryModuleCache;

diff  --git a/clang/include/clang/Frontend/FrontendActions.h b/clang/include/clang/Frontend/FrontendActions.h
index 545a7e842c4ff..8bd6509559f70 100644
--- a/clang/include/clang/Frontend/FrontendActions.h
+++ b/clang/include/clang/Frontend/FrontendActions.h
@@ -15,9 +15,6 @@
 
 namespace clang {
 
-class Module;
-class FileEntry;
-
 //===----------------------------------------------------------------------===//
 // Custom Consumer Actions
 //===----------------------------------------------------------------------===//

diff  --git a/clang/include/clang/Frontend/SerializedDiagnosticPrinter.h b/clang/include/clang/Frontend/SerializedDiagnosticPrinter.h
index 58954dc6bafa4..5586ef65e393f 100644
--- a/clang/include/clang/Frontend/SerializedDiagnosticPrinter.h
+++ b/clang/include/clang/Frontend/SerializedDiagnosticPrinter.h
@@ -19,7 +19,6 @@ class raw_ostream;
 
 namespace clang {
 class DiagnosticConsumer;
-class DiagnosticsEngine;
 class DiagnosticOptions;
 
 namespace serialized_diags {

diff  --git a/clang/include/clang/Interpreter/Interpreter.h b/clang/include/clang/Interpreter/Interpreter.h
index 2dc0fd5963a2f..721a649deb43b 100644
--- a/clang/include/clang/Interpreter/Interpreter.h
+++ b/clang/include/clang/Interpreter/Interpreter.h
@@ -28,13 +28,11 @@ namespace llvm {
 namespace orc {
 class ThreadSafeContext;
 }
-class Module;
 } // namespace llvm
 
 namespace clang {
 
 class CompilerInstance;
-class DeclGroupRef;
 class IncrementalExecutor;
 class IncrementalParser;
 

diff  --git a/clang/include/clang/Sema/AnalysisBasedWarnings.h b/clang/include/clang/Sema/AnalysisBasedWarnings.h
index 49b69c585ff79..13a88bb9f8968 100644
--- a/clang/include/clang/Sema/AnalysisBasedWarnings.h
+++ b/clang/include/clang/Sema/AnalysisBasedWarnings.h
@@ -18,10 +18,8 @@
 
 namespace clang {
 
-class BlockExpr;
 class Decl;
 class FunctionDecl;
-class ObjCMethodDecl;
 class QualType;
 class Sema;
 namespace sema {

diff  --git a/clang/include/clang/Sema/ExternalSemaSource.h b/clang/include/clang/Sema/ExternalSemaSource.h
index 9c18aa1398d37..17a7ffd3bb680 100644
--- a/clang/include/clang/Sema/ExternalSemaSource.h
+++ b/clang/include/clang/Sema/ExternalSemaSource.h
@@ -26,11 +26,9 @@ template <class T, unsigned n> class SmallSetVector;
 namespace clang {
 
 class CXXConstructorDecl;
-class CXXDeleteExpr;
 class CXXRecordDecl;
 class DeclaratorDecl;
 class LookupResult;
-struct ObjCMethodList;
 class Scope;
 class Sema;
 class TypedefNameDecl;

diff  --git a/clang/include/clang/Sema/Initialization.h b/clang/include/clang/Sema/Initialization.h
index 679e12ee22d4a..21adc9fa2ac0b 100644
--- a/clang/include/clang/Sema/Initialization.h
+++ b/clang/include/clang/Sema/Initialization.h
@@ -38,7 +38,6 @@
 
 namespace clang {
 
-class APValue;
 class CXXBaseSpecifier;
 class CXXConstructorDecl;
 class ObjCMethodDecl;

diff  --git a/clang/include/clang/Sema/ScopeInfo.h b/clang/include/clang/Sema/ScopeInfo.h
index ccd15ea6a818f..08bf53d22f8a4 100644
--- a/clang/include/clang/Sema/ScopeInfo.h
+++ b/clang/include/clang/Sema/ScopeInfo.h
@@ -58,7 +58,6 @@ class Scope;
 class Stmt;
 class SwitchStmt;
 class TemplateParameterList;
-class TemplateTypeParmDecl;
 class VarDecl;
 
 namespace sema {

diff  --git a/clang/include/clang/Serialization/ASTReader.h b/clang/include/clang/Serialization/ASTReader.h
index f24ccf579aa8f..a36c8ba20a10a 100644
--- a/clang/include/clang/Serialization/ASTReader.h
+++ b/clang/include/clang/Serialization/ASTReader.h
@@ -84,7 +84,6 @@ class GlobalModuleIndex;
 struct HeaderFileInfo;
 class HeaderSearchOptions;
 class LangOptions;
-class LazyASTUnresolvedSet;
 class MacroInfo;
 class InMemoryModuleCache;
 class NamedDecl;
@@ -94,7 +93,6 @@ class ObjCInterfaceDecl;
 class PCHContainerReader;
 class Preprocessor;
 class PreprocessorOptions;
-struct QualifierInfo;
 class Sema;
 class SourceManager;
 class Stmt;

diff  --git a/clang/include/clang/Serialization/ASTWriter.h b/clang/include/clang/Serialization/ASTWriter.h
index 978f6d86ea5c8..27a8770d7f267 100644
--- a/clang/include/clang/Serialization/ASTWriter.h
+++ b/clang/include/clang/Serialization/ASTWriter.h
@@ -43,26 +43,13 @@
 #include <utility>
 #include <vector>
 
-namespace llvm {
-
-class APFloat;
-class APInt;
-class APSInt;
-
-} // namespace llvm
-
 namespace clang {
 
 class ASTContext;
 class ASTReader;
-class ASTUnresolvedSet;
 class Attr;
-class CXXBaseSpecifier;
-class CXXCtorInitializer;
 class CXXRecordDecl;
-class CXXTemporary;
 class FileEntry;
-class FPOptions;
 class FPOptionsOverride;
 class FunctionDecl;
 class HeaderSearch;
@@ -79,16 +66,13 @@ class NamedDecl;
 class ObjCInterfaceDecl;
 class PreprocessingRecord;
 class Preprocessor;
-struct QualifierInfo;
 class RecordDecl;
 class Sema;
 class SourceManager;
 class Stmt;
 class StoredDeclsList;
 class SwitchCase;
-class TemplateParameterList;
 class Token;
-class TypeSourceInfo;
 
 /// Writes an AST file containing the contents of a translation unit.
 ///

diff  --git a/clang/include/clang/Serialization/GlobalModuleIndex.h b/clang/include/clang/Serialization/GlobalModuleIndex.h
index 5f48126262247..9d6b52a97f52e 100644
--- a/clang/include/clang/Serialization/GlobalModuleIndex.h
+++ b/clang/include/clang/Serialization/GlobalModuleIndex.h
@@ -31,8 +31,6 @@ class MemoryBuffer;
 
 namespace clang {
 
-class DirectoryEntry;
-class FileEntry;
 class FileManager;
 class IdentifierIterator;
 class PCHContainerOperations;

diff  --git a/clang/include/clang/Serialization/PCHContainerOperations.h b/clang/include/clang/Serialization/PCHContainerOperations.h
index 33fc4a0a24e07..9f9700a418a9c 100644
--- a/clang/include/clang/Serialization/PCHContainerOperations.h
+++ b/clang/include/clang/Serialization/PCHContainerOperations.h
@@ -22,8 +22,6 @@ class raw_pwrite_stream;
 namespace clang {
 
 class ASTConsumer;
-class CodeGenOptions;
-class DiagnosticsEngine;
 class CompilerInstance;
 
 struct PCHBuffer {

diff  --git a/clang/include/clang/StaticAnalyzer/Checkers/BuiltinCheckerRegistration.h b/clang/include/clang/StaticAnalyzer/Checkers/BuiltinCheckerRegistration.h
index a6069d7dfdc0e..bdfe3901c5b80 100644
--- a/clang/include/clang/StaticAnalyzer/Checkers/BuiltinCheckerRegistration.h
+++ b/clang/include/clang/StaticAnalyzer/Checkers/BuiltinCheckerRegistration.h
@@ -17,13 +17,9 @@
 #include "clang/StaticAnalyzer/Core/BugReporter/CommonBugCategories.h"
 
 namespace clang {
-
-class LangOptions;
-
 namespace ento {
 
 class CheckerManager;
-class CheckerRegistry;
 
 #define GET_CHECKERS
 #define CHECKER(FULLNAME, CLASS, HELPTEXT, DOC_URI, IS_HIDDEN)                 \

diff  --git a/clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h b/clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h
index 3c93ebeccde8d..9ec5bcc875546 100644
--- a/clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h
+++ b/clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h
@@ -48,7 +48,6 @@ namespace clang {
 class AnalyzerOptions;
 class ASTContext;
 class Decl;
-class DiagnosticsEngine;
 class LocationContext;
 class SourceManager;
 class Stmt;
@@ -61,7 +60,6 @@ class ExplodedGraph;
 class ExplodedNode;
 class ExprEngine;
 class MemRegion;
-class SValBuilder;
 
 //===----------------------------------------------------------------------===//
 // Interface for individual bug reports.

diff  --git a/clang/include/clang/StaticAnalyzer/Core/BugReporter/BugType.h b/clang/include/clang/StaticAnalyzer/Core/BugReporter/BugType.h
index 49ab25eca2ddb..5588811763273 100644
--- a/clang/include/clang/StaticAnalyzer/Core/BugReporter/BugType.h
+++ b/clang/include/clang/StaticAnalyzer/Core/BugReporter/BugType.h
@@ -23,8 +23,6 @@ namespace clang {
 namespace ento {
 
 class BugReporter;
-class ExplodedNode;
-class ExprEngine;
 
 class BugType {
 private:

diff  --git a/clang/include/clang/StaticAnalyzer/Core/CheckerManager.h b/clang/include/clang/StaticAnalyzer/Core/CheckerManager.h
index d2f71baa56a46..7e45d24e56954 100644
--- a/clang/include/clang/StaticAnalyzer/Core/CheckerManager.h
+++ b/clang/include/clang/StaticAnalyzer/Core/CheckerManager.h
@@ -28,7 +28,6 @@ namespace clang {
 
 class AnalyzerOptions;
 class CallExpr;
-class CXXNewExpr;
 class Decl;
 class LocationContext;
 class Stmt;

diff  --git a/clang/include/clang/StaticAnalyzer/Core/PathDiagnosticConsumers.h b/clang/include/clang/StaticAnalyzer/Core/PathDiagnosticConsumers.h
index 71a590d9e9a29..2694aac478cd4 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathDiagnosticConsumers.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathDiagnosticConsumers.h
@@ -20,7 +20,6 @@
 
 namespace clang {
 
-class AnalyzerOptions;
 class MacroExpansionContext;
 class Preprocessor;
 

diff  --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h
index bb598af681666..8a778389bcbe1 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h
@@ -34,7 +34,6 @@
 namespace clang {
 
 class CXXBaseSpecifier;
-class DeclaratorDecl;
 
 namespace ento {
 

diff  --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h
index d135e70dd75dc..bfaeb06951d76 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h
@@ -76,7 +76,6 @@ enum CallEventKind {
 };
 
 class CallEvent;
-class CallDescription;
 
 template<typename T = CallEvent>
 class CallEventRef : public IntrusiveRefCntPtr<const T> {

diff  --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerHelpers.h b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerHelpers.h
index a81d67ab30639..e89a993ca8d24 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerHelpers.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerHelpers.h
@@ -24,7 +24,6 @@ namespace clang {
 class Expr;
 class VarDecl;
 class QualType;
-class AttributedType;
 class Preprocessor;
 
 namespace ento {

diff  --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
index cef7dda172f3e..feb4a72fe8d06 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
@@ -77,13 +77,9 @@ namespace ento {
 
 class AnalysisManager;
 class BasicValueFactory;
-class BlockCounter;
-class BranchNodeBuilder;
 class CallEvent;
 class CheckerManager;
 class ConstraintManager;
-class CXXTempObjectRegion;
-class EndOfFunctionNodeBuilder;
 class ExplodedNodeSet;
 class ExplodedNode;
 class IndirectGotoNodeBuilder;

diff  --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/LoopUnrolling.h b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/LoopUnrolling.h
index 53b221cb53c92..eb2b0b343428f 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/LoopUnrolling.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/LoopUnrolling.h
@@ -28,7 +28,6 @@
 #include "clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h"
 namespace clang {
 namespace ento {
-class AnalysisManager;
 
 /// Returns if the given State indicates that is inside a completely unrolled
 /// loop.

diff  --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h
index 9a34639e2707c..3204ac460ed03 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h
@@ -47,8 +47,6 @@ typedef std::unique_ptr<StoreManager>(*StoreManagerCreator)(
 // ProgramStateTrait - Traits used by the Generic Data Map of a ProgramState.
 //===----------------------------------------------------------------------===//
 
-template <typename T> struct ProgramStatePartialTrait;
-
 template <typename T> struct ProgramStateTrait {
   typedef typename T::data_type data_type;
   static inline void *MakeVoidPtr(data_type D) { return (void*) D; }

diff  --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h
index 6199c8d8d179c..f4b229070d67f 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h
@@ -35,7 +35,6 @@
 namespace clang {
 
 class CXXBaseSpecifier;
-class DeclaratorDecl;
 class FunctionDecl;
 class LabelDecl;
 

diff  --git a/clang/include/clang/StaticAnalyzer/Frontend/AnalysisConsumer.h b/clang/include/clang/StaticAnalyzer/Frontend/AnalysisConsumer.h
index bcc29a60ad703..f3b1c1f206459 100644
--- a/clang/include/clang/StaticAnalyzer/Frontend/AnalysisConsumer.h
+++ b/clang/include/clang/StaticAnalyzer/Frontend/AnalysisConsumer.h
@@ -21,14 +21,10 @@
 
 namespace clang {
 
-class Preprocessor;
-class DiagnosticsEngine;
-class CodeInjector;
 class CompilerInstance;
 
 namespace ento {
 class PathDiagnosticConsumer;
-class CheckerManager;
 class CheckerRegistry;
 
 class AnalysisASTConsumer : public ASTConsumer {

diff  --git a/clang/include/clang/StaticAnalyzer/Frontend/FrontendActions.h b/clang/include/clang/StaticAnalyzer/Frontend/FrontendActions.h
index 2b12330e4f2db..31b1c245200ec 100644
--- a/clang/include/clang/StaticAnalyzer/Frontend/FrontendActions.h
+++ b/clang/include/clang/StaticAnalyzer/Frontend/FrontendActions.h
@@ -16,12 +16,9 @@
 namespace clang {
 
 class Stmt;
-class AnalyzerOptions;
 
 namespace ento {
 
-class CheckerManager;
-
 //===----------------------------------------------------------------------===//
 // AST Consumer Actions
 //===----------------------------------------------------------------------===//

diff  --git a/clang/include/clang/Tooling/ASTDiff/ASTDiffInternal.h b/clang/include/clang/Tooling/ASTDiff/ASTDiffInternal.h
index 1e784ef43ac16..fb7bd4e8afa23 100644
--- a/clang/include/clang/Tooling/ASTDiff/ASTDiffInternal.h
+++ b/clang/include/clang/Tooling/ASTDiff/ASTDiffInternal.h
@@ -18,7 +18,6 @@ namespace 
diff  {
 using DynTypedNode = DynTypedNode;
 
 class SyntaxTree;
-class SyntaxTreeImpl;
 struct ComparisonOptions;
 
 /// Within a tree, this identifies a node by its preorder offset.

diff  --git a/clang/include/clang/Tooling/Refactoring/Rename/RenamingAction.h b/clang/include/clang/Tooling/Refactoring/Rename/RenamingAction.h
index 8e72076b7b5ee..43a8d56e4e717 100644
--- a/clang/include/clang/Tooling/Refactoring/Rename/RenamingAction.h
+++ b/clang/include/clang/Tooling/Refactoring/Rename/RenamingAction.h
@@ -23,7 +23,6 @@
 
 namespace clang {
 class ASTConsumer;
-class CompilerInstance;
 
 namespace tooling {
 

diff  --git a/clang/include/clang/Tooling/Refactoring/Rename/USRFindingAction.h b/clang/include/clang/Tooling/Refactoring/Rename/USRFindingAction.h
index e43721bdccd1e..e81b5c2345c95 100644
--- a/clang/include/clang/Tooling/Refactoring/Rename/USRFindingAction.h
+++ b/clang/include/clang/Tooling/Refactoring/Rename/USRFindingAction.h
@@ -23,7 +23,6 @@
 namespace clang {
 class ASTConsumer;
 class ASTContext;
-class CompilerInstance;
 class NamedDecl;
 
 namespace tooling {

diff  --git a/clang/include/clang/Tooling/Tooling.h b/clang/include/clang/Tooling/Tooling.h
index c9c6a2ffb7b3b..b36f58ad3046e 100644
--- a/clang/include/clang/Tooling/Tooling.h
+++ b/clang/include/clang/Tooling/Tooling.h
@@ -54,7 +54,6 @@ class CompilerInstance;
 class CompilerInvocation;
 class DiagnosticConsumer;
 class DiagnosticsEngine;
-class SourceManager;
 
 namespace driver {
 

diff  --git a/clang/tools/libclang/CXType.h b/clang/tools/libclang/CXType.h
index 1d458086c09e6..ffe70a9b1c3e4 100644
--- a/clang/tools/libclang/CXType.h
+++ b/clang/tools/libclang/CXType.h
@@ -17,9 +17,6 @@
 #include "clang/AST/Type.h"
 
 namespace clang {
-  
-class ASTUnit;
-  
 namespace cxtype {
   
 CXType MakeCXType(QualType T, CXTranslationUnit TU);


        


More information about the cfe-commits mailing list