clang 19.0.0git
Classes | Namespaces | Macros | Typedefs | Functions
ASTImporter.cpp File Reference
#include "clang/AST/ASTImporter.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/ASTDiagnostic.h"
#include "clang/AST/ASTImporterSharedState.h"
#include "clang/AST/ASTStructuralEquivalence.h"
#include "clang/AST/Attr.h"
#include "clang/AST/Decl.h"
#include "clang/AST/DeclAccessPair.h"
#include "clang/AST/DeclBase.h"
#include "clang/AST/DeclCXX.h"
#include "clang/AST/DeclFriend.h"
#include "clang/AST/DeclGroup.h"
#include "clang/AST/DeclObjC.h"
#include "clang/AST/DeclTemplate.h"
#include "clang/AST/DeclVisitor.h"
#include "clang/AST/DeclarationName.h"
#include "clang/AST/Expr.h"
#include "clang/AST/ExprCXX.h"
#include "clang/AST/ExprObjC.h"
#include "clang/AST/ExternalASTSource.h"
#include "clang/AST/LambdaCapture.h"
#include "clang/AST/NestedNameSpecifier.h"
#include "clang/AST/OperationKinds.h"
#include "clang/AST/Stmt.h"
#include "clang/AST/StmtCXX.h"
#include "clang/AST/StmtObjC.h"
#include "clang/AST/StmtVisitor.h"
#include "clang/AST/TemplateBase.h"
#include "clang/AST/TemplateName.h"
#include "clang/AST/Type.h"
#include "clang/AST/TypeLoc.h"
#include "clang/AST/TypeVisitor.h"
#include "clang/AST/UnresolvedSet.h"
#include "clang/Basic/Builtins.h"
#include "clang/Basic/ExceptionSpecificationType.h"
#include "clang/Basic/FileManager.h"
#include "clang/Basic/IdentifierTable.h"
#include "clang/Basic/LLVM.h"
#include "clang/Basic/LangOptions.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Basic/Specifiers.h"
#include "llvm/ADT/APSInt.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/ScopeExit.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/MemoryBuffer.h"
#include <algorithm>
#include <cassert>
#include <cstddef>
#include <memory>
#include <optional>
#include <type_traits>
#include <utility>
#include "clang/AST/TypeNodes.inc"
#include "clang/Basic/OpenCLImageTypes.def"
#include "clang/Basic/OpenCLExtensionTypes.def"
#include "clang/Basic/AArch64SVEACLETypes.def"
#include "clang/Basic/PPCTypes.def"
#include "clang/Basic/RISCVVTypes.def"
#include "clang/Basic/WebAssemblyReferenceTypes.def"
#include "clang/AST/BuiltinTypes.def"
#include "clang/AST/CXXRecordDeclDefinitionBits.def"

Go to the source code of this file.

Classes

class  clang::ChildErrorHandlingStrategy
 How to handle import errors that occur when import of a child declaration of a DeclContext fails. More...
 
class  clang::ASTNodeImporter
 
struct  FriendCountAndPosition
 Used as return type of getFriendCountAndPosition. More...
 

Namespaces

namespace  clang
 The JSON file list parser is used to communicate input to InstallAPI.
 

Macros

#define TYPE(Class, Base)    ExpectedType Visit##Class##Type(const Class##Type *T);
 
#define IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix)
 
#define EXT_OPAQUE_TYPE(ExtType, Id, Ext)
 
#define SVE_TYPE(Name, Id, SingletonId)
 
#define PPC_VECTOR_TYPE(Name, Id, Size)
 
#define RVV_TYPE(Name, Id, SingletonId)
 
#define WASM_TYPE(Name, Id, SingletonId)
 
#define SHARED_SINGLETON_TYPE(Expansion)
 
#define BUILTIN_TYPE(Id, SingletonId)    case BuiltinType::Id: return Importer.getToContext().SingletonId;
 
#define FIELD(Name, Width, Merge)    ToData.Name = FromData.Name;
 

Typedefs

using clang::ExpectedTypePtr = llvm::Expected< const Type * >
 
using clang::ExpectedType = llvm::Expected< QualType >
 
using clang::ExpectedStmt = llvm::Expected< Stmt * >
 
using clang::ExpectedExpr = llvm::Expected< Expr * >
 
using clang::ExpectedDecl = llvm::Expected< Decl * >
 
using clang::ExpectedSLoc = llvm::Expected< SourceLocation >
 
using clang::ExpectedName = llvm::Expected< DeclarationName >
 

Functions

template<class T >
SmallVector< Decl *, 2 > clang::getCanonicalForwardRedeclChain (Redeclarable< T > *D)
 
llvm::SmallVector< Decl *, 2 > clang::getCanonicalForwardRedeclChain (Decl *D)
 
void clang::updateFlags (const Decl *From, Decl *To)
 
static Error setTypedefNameForAnonDecl (TagDecl *From, TagDecl *To, ASTImporter &Importer)
 
static StructuralEquivalenceKind getStructuralEquivalenceKind (const ASTImporter &Importer)
 
static bool isAncestorDeclContextOf (const DeclContext *DC, const Decl *D)
 
static bool isAncestorDeclContextOf (const DeclContext *DC, const Stmt *S)
 
static bool IsEquivalentFriend (ASTImporter &Importer, FriendDecl *FD1, FriendDecl *FD2)
 
static FriendCountAndPosition getFriendCountAndPosition (ASTImporter &Importer, FriendDecl *FD)
 
template<typename T >
static auto getTemplateDefinition (T *D) -> T *
 

Macro Definition Documentation

◆ BUILTIN_TYPE

#define BUILTIN_TYPE (   Id,
  SingletonId 
)     case BuiltinType::Id: return Importer.getToContext().SingletonId;

◆ EXT_OPAQUE_TYPE

#define EXT_OPAQUE_TYPE (   ExtType,
  Id,
  Ext 
)
Value:
case BuiltinType::Id: \
return Importer.getToContext().Id##Ty;

◆ FIELD

#define FIELD (   Name,
  Width,
  Merge 
)     ToData.Name = FromData.Name;

◆ IMAGE_TYPE

#define IMAGE_TYPE (   ImgType,
  Id,
  SingletonId,
  Access,
  Suffix 
)
Value:
case BuiltinType::Id: \
return Importer.getToContext().SingletonId;

◆ PPC_VECTOR_TYPE

#define PPC_VECTOR_TYPE (   Name,
  Id,
  Size 
)
Value:
case BuiltinType::Id: \
return Importer.getToContext().Id##Ty;

◆ RVV_TYPE

#define RVV_TYPE (   Name,
  Id,
  SingletonId 
)
Value:
case BuiltinType::Id: \
return Importer.getToContext().SingletonId;

◆ SHARED_SINGLETON_TYPE

#define SHARED_SINGLETON_TYPE (   Expansion)

◆ SVE_TYPE

#define SVE_TYPE (   Name,
  Id,
  SingletonId 
)
Value:
case BuiltinType::Id: \
return Importer.getToContext().SingletonId;

◆ TYPE

#define TYPE (   Class,
  Base 
)     ExpectedType Visit##Class##Type(const Class##Type *T);

Definition at line 371 of file ASTImporter.cpp.

◆ WASM_TYPE

#define WASM_TYPE (   Name,
  Id,
  SingletonId 
)
Value:
case BuiltinType::Id: \
return Importer.getToContext().SingletonId;

Function Documentation

◆ getFriendCountAndPosition()

static FriendCountAndPosition getFriendCountAndPosition ( ASTImporter Importer,
FriendDecl FD 
)
static

◆ getStructuralEquivalenceKind()

static StructuralEquivalenceKind getStructuralEquivalenceKind ( const ASTImporter Importer)
static

◆ getTemplateDefinition()

template<typename T >
static auto getTemplateDefinition ( T *  D) -> T *
static

◆ isAncestorDeclContextOf() [1/2]

static bool isAncestorDeclContextOf ( const DeclContext DC,
const Decl D 
)
static

◆ isAncestorDeclContextOf() [2/2]

static bool isAncestorDeclContextOf ( const DeclContext DC,
const Stmt S 
)
static

◆ IsEquivalentFriend()

static bool IsEquivalentFriend ( ASTImporter Importer,
FriendDecl FD1,
FriendDecl FD2 
)
static

◆ setTypedefNameForAnonDecl()

static Error setTypedefNameForAnonDecl ( TagDecl From,
TagDecl To,
ASTImporter Importer 
)
static