Author: rtrieu Date: Thu Jan 10 17:32:35 2019 New Revision: 350913 URL: http://llvm.org/viewvc/llvm-project?rev=350913&view=rev Log: Fix header issues.
Several headers would fail to compile if other headers were not previously included. The usual issue is that a class is forward declared, but the full definition is needed. The requirement for the definition is use of isa/dyn_cast or calling functions of pointer-packed data types such as DenseMap or PointerIntPair. Add missing includes to these headers. SVals.h required an out-of-line method definition in the .cpp file to avoid circular inclusion of headers with BasicValueFactory.h Modified: cfe/trunk/include/clang/AST/ASTStructuralEquivalence.h cfe/trunk/include/clang/AST/BaseSubobject.h cfe/trunk/include/clang/AST/Mangle.h cfe/trunk/include/clang/AST/TemplateName.h cfe/trunk/include/clang/Analysis/ConstructionContext.h cfe/trunk/include/clang/Lex/PreprocessingRecord.h cfe/trunk/include/clang/Sema/Scope.h cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h cfe/trunk/lib/CodeGen/CGOpenCLRuntime.h cfe/trunk/lib/CodeGen/CGOpenMPRuntime.h cfe/trunk/lib/CodeGen/VarBypassDetector.h cfe/trunk/lib/StaticAnalyzer/Core/SVals.cpp Modified: cfe/trunk/include/clang/AST/ASTStructuralEquivalence.h URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/ASTStructuralEquivalence.h?rev=350913&r1=350912&r2=350913&view=diff ============================================================================== --- cfe/trunk/include/clang/AST/ASTStructuralEquivalence.h (original) +++ cfe/trunk/include/clang/AST/ASTStructuralEquivalence.h Thu Jan 10 17:32:35 2019 @@ -15,6 +15,7 @@ #ifndef LLVM_CLANG_AST_ASTSTRUCTURALEQUIVALENCE_H #define LLVM_CLANG_AST_ASTSTRUCTURALEQUIVALENCE_H +#include "clang/AST/DeclBase.h" #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/DenseSet.h" #include "llvm/ADT/Optional.h" Modified: cfe/trunk/include/clang/AST/BaseSubobject.h URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/BaseSubobject.h?rev=350913&r1=350912&r2=350913&view=diff ============================================================================== --- cfe/trunk/include/clang/AST/BaseSubobject.h (original) +++ cfe/trunk/include/clang/AST/BaseSubobject.h Thu Jan 10 17:32:35 2019 @@ -15,6 +15,7 @@ #define LLVM_CLANG_AST_BASESUBOBJECT_H #include "clang/AST/CharUnits.h" +#include "clang/AST/DeclCXX.h" #include "llvm/ADT/DenseMapInfo.h" #include "llvm/Support/type_traits.h" #include <cstdint> Modified: cfe/trunk/include/clang/AST/Mangle.h URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Mangle.h?rev=350913&r1=350912&r2=350913&view=diff ============================================================================== --- cfe/trunk/include/clang/AST/Mangle.h (original) +++ cfe/trunk/include/clang/AST/Mangle.h Thu Jan 10 17:32:35 2019 @@ -14,6 +14,7 @@ #ifndef LLVM_CLANG_AST_MANGLE_H #define LLVM_CLANG_AST_MANGLE_H +#include "clang/AST/Decl.h" #include "clang/AST/Type.h" #include "clang/Basic/ABI.h" #include "llvm/ADT/DenseMap.h" Modified: cfe/trunk/include/clang/AST/TemplateName.h URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/TemplateName.h?rev=350913&r1=350912&r2=350913&view=diff ============================================================================== --- cfe/trunk/include/clang/AST/TemplateName.h (original) +++ cfe/trunk/include/clang/AST/TemplateName.h Thu Jan 10 17:32:35 2019 @@ -14,6 +14,7 @@ #ifndef LLVM_CLANG_AST_TEMPLATENAME_H #define LLVM_CLANG_AST_TEMPLATENAME_H +#include "clang/AST/NestedNameSpecifier.h" #include "clang/Basic/LLVM.h" #include "llvm/ADT/FoldingSet.h" #include "llvm/ADT/PointerIntPair.h" Modified: cfe/trunk/include/clang/Analysis/ConstructionContext.h URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/ConstructionContext.h?rev=350913&r1=350912&r2=350913&view=diff ============================================================================== --- cfe/trunk/include/clang/Analysis/ConstructionContext.h (original) +++ cfe/trunk/include/clang/Analysis/ConstructionContext.h Thu Jan 10 17:32:35 2019 @@ -19,6 +19,7 @@ #include "clang/Analysis/Support/BumpVector.h" #include "clang/AST/ExprCXX.h" +#include "clang/AST/ExprObjC.h" namespace clang { Modified: cfe/trunk/include/clang/Lex/PreprocessingRecord.h URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Lex/PreprocessingRecord.h?rev=350913&r1=350912&r2=350913&view=diff ============================================================================== --- cfe/trunk/include/clang/Lex/PreprocessingRecord.h (original) +++ cfe/trunk/include/clang/Lex/PreprocessingRecord.h Thu Jan 10 17:32:35 2019 @@ -15,6 +15,7 @@ #ifndef LLVM_CLANG_LEX_PREPROCESSINGRECORD_H #define LLVM_CLANG_LEX_PREPROCESSINGRECORD_H +#include "clang/Basic/IdentifierTable.h" #include "clang/Basic/LLVM.h" #include "clang/Basic/SourceLocation.h" #include "clang/Lex/PPCallbacks.h" Modified: cfe/trunk/include/clang/Sema/Scope.h URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Sema/Scope.h?rev=350913&r1=350912&r2=350913&view=diff ============================================================================== --- cfe/trunk/include/clang/Sema/Scope.h (original) +++ cfe/trunk/include/clang/Sema/Scope.h Thu Jan 10 17:32:35 2019 @@ -14,6 +14,7 @@ #ifndef LLVM_CLANG_SEMA_SCOPE_H #define LLVM_CLANG_SEMA_SCOPE_H +#include "clang/AST/Decl.h" #include "clang/Basic/Diagnostic.h" #include "llvm/ADT/PointerIntPair.h" #include "llvm/ADT/SmallPtrSet.h" Modified: cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h?rev=350913&r1=350912&r2=350913&view=diff ============================================================================== --- cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h (original) +++ cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h Thu Jan 10 17:32:35 2019 @@ -24,6 +24,7 @@ #include "clang/AST/Expr.h" #include "clang/AST/ExprObjC.h" #include "clang/AST/Type.h" +#include "clang/Analysis/AnalysisDeclContext.h" #include "clang/Basic/LLVM.h" #include "clang/Basic/SourceLocation.h" #include "clang/StaticAnalyzer/Core/PathSensitive/SVals.h" Modified: cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h?rev=350913&r1=350912&r2=350913&view=diff ============================================================================== --- cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h (original) +++ cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h Thu Jan 10 17:32:35 2019 @@ -530,9 +530,7 @@ public: return PTMDataType::getFromOpaqueValue(const_cast<void *>(Data)); } - bool isNullMemberPointer() const { - return getPTMData().isNull(); - } + bool isNullMemberPointer() const; const DeclaratorDecl *getDecl() const; Modified: cfe/trunk/lib/CodeGen/CGOpenCLRuntime.h URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGOpenCLRuntime.h?rev=350913&r1=350912&r2=350913&view=diff ============================================================================== --- cfe/trunk/lib/CodeGen/CGOpenCLRuntime.h (original) +++ cfe/trunk/lib/CodeGen/CGOpenCLRuntime.h Thu Jan 10 17:32:35 2019 @@ -16,6 +16,7 @@ #ifndef LLVM_CLANG_LIB_CODEGEN_CGOPENCLRUNTIME_H #define LLVM_CLANG_LIB_CODEGEN_CGOPENCLRUNTIME_H +#include "clang/AST/Expr.h" #include "clang/AST/Type.h" #include "llvm/ADT/DenseMap.h" #include "llvm/IR/Type.h" Modified: cfe/trunk/lib/CodeGen/CGOpenMPRuntime.h URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGOpenMPRuntime.h?rev=350913&r1=350912&r2=350913&view=diff ============================================================================== --- cfe/trunk/lib/CodeGen/CGOpenMPRuntime.h (original) +++ cfe/trunk/lib/CodeGen/CGOpenMPRuntime.h Thu Jan 10 17:32:35 2019 @@ -15,6 +15,7 @@ #define LLVM_CLANG_LIB_CODEGEN_CGOPENMPRUNTIME_H #include "CGValue.h" +#include "clang/AST/DeclOpenMP.h" #include "clang/AST/Type.h" #include "clang/Basic/OpenMPKinds.h" #include "clang/Basic/SourceLocation.h" Modified: cfe/trunk/lib/CodeGen/VarBypassDetector.h URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/VarBypassDetector.h?rev=350913&r1=350912&r2=350913&view=diff ============================================================================== --- cfe/trunk/lib/CodeGen/VarBypassDetector.h (original) +++ cfe/trunk/lib/CodeGen/VarBypassDetector.h Thu Jan 10 17:32:35 2019 @@ -15,6 +15,7 @@ #ifndef LLVM_CLANG_LIB_CODEGEN_VARBYPASSDETECTOR_H #define LLVM_CLANG_LIB_CODEGEN_VARBYPASSDETECTOR_H +#include "clang/AST/Decl.h" #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/DenseSet.h" #include "llvm/ADT/SmallVector.h" Modified: cfe/trunk/lib/StaticAnalyzer/Core/SVals.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/SVals.cpp?rev=350913&r1=350912&r2=350913&view=diff ============================================================================== --- cfe/trunk/lib/StaticAnalyzer/Core/SVals.cpp (original) +++ cfe/trunk/lib/StaticAnalyzer/Core/SVals.cpp Thu Jan 10 17:32:35 2019 @@ -171,6 +171,10 @@ const TypedValueRegion *nonloc::LazyComp return static_cast<const LazyCompoundValData*>(Data)->getRegion(); } +bool nonloc::PointerToMember::isNullMemberPointer() const { + return getPTMData().isNull(); +} + const DeclaratorDecl *nonloc::PointerToMember::getDecl() const { const auto PTMD = this->getPTMData(); if (PTMD.isNull()) _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits