]> granicus.if.org Git - clang/commitdiff
Fix header issues.
authorRichard Trieu <rtrieu@google.com>
Fri, 11 Jan 2019 01:32:35 +0000 (01:32 +0000)
committerRichard Trieu <rtrieu@google.com>
Fri, 11 Jan 2019 01:32:35 +0000 (01:32 +0000)
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

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

13 files changed:
include/clang/AST/ASTStructuralEquivalence.h
include/clang/AST/BaseSubobject.h
include/clang/AST/Mangle.h
include/clang/AST/TemplateName.h
include/clang/Analysis/ConstructionContext.h
include/clang/Lex/PreprocessingRecord.h
include/clang/Sema/Scope.h
include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h
include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h
lib/CodeGen/CGOpenCLRuntime.h
lib/CodeGen/CGOpenMPRuntime.h
lib/CodeGen/VarBypassDetector.h
lib/StaticAnalyzer/Core/SVals.cpp

index 2037796cd5526132451bade4ddcc0da0ecd920e8..f8847505bc72eb23159ab14c4f8019c9dfee237a 100644 (file)
@@ -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"
index 2b702c76b2fabeebef3c1de0207d58f9e5220991..8fd4ac69ebd6164ace543eeff0b80c654122ddb1 100644 (file)
@@ -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>
index c42fe91b32469e851b68fb181ef2058440e9e746..309ed5a1a5d2e3b6a442bc19ef2157b55d6590fc 100644 (file)
@@ -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"
index d88d58d0a2aad135be827cd011ff32b775b40bf8..48272597d4d15e0c63dd669bc3eabc61ba28cbbd 100644 (file)
@@ -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"
index 9c62bac209ae1131f6276766ea92de5ee0992961..27c1d5b9f1a570943a102519571b9fe9933508e6 100644 (file)
@@ -19,6 +19,7 @@
 
 #include "clang/Analysis/Support/BumpVector.h"
 #include "clang/AST/ExprCXX.h"
+#include "clang/AST/ExprObjC.h"
 
 namespace clang {
 
index 44d79d9b62290cd1c51d086cc5fc172cfd6239d1..027dd3ac5d55bb1d76d565507646bf40bbe845d1 100644 (file)
@@ -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"
index 11fa0362124b9035733f16c408fb3d3cab5e1ea5..9d9ab0514fb556314246ad56f78e9910a3bd471a 100644 (file)
@@ -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"
index bf01289a40f6ab443529455a93aad0b3144b5b0e..3d0ff4efa1d7f7bc5889db653dbf2b5e6e151a3c 100644 (file)
@@ -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"
index 1b79bfc3f8cf1f017be4aeda982710052dcf04f7..0efe96f67f8e39928b4f0d18a4a6861155c6ca77 100644 (file)
@@ -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;
 
index 3da55af065b431a4a8b0ff0c8f09c05a331af677..750721f1b80ff18eedbdbfa820825dc50450560c 100644 (file)
@@ -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"
index 933c8af116d3b3ddfda00bdd11c2bd3cfb76de77..1822a6fd197427765d7bf4c98256ef376cf5e172 100644 (file)
@@ -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"
index f50baf4bab9f99e44871771c714add387c22d55c..47fe13cfacd6d7a1fbfe00c07582e7387a07bb05 100644 (file)
@@ -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"
index b32be9e82d4e4846c9e0e6d69479b90907baeaf7..933c5c33007238e06c73e336735ab296313c6986 100644 (file)
@@ -171,6 +171,10 @@ const TypedValueRegion *nonloc::LazyCompoundVal::getRegion() const {
   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())