clang  10.0.0svn
Enumerations | Functions
SemaModule.cpp File Reference
#include "clang/AST/ASTConsumer.h"
#include "clang/Lex/HeaderSearch.h"
#include "clang/Lex/Preprocessor.h"
#include "clang/Sema/SemaInternal.h"
Include dependency graph for SemaModule.cpp:

Go to the source code of this file.

Enumerations

enum  UnnamedDeclKind
 

Functions

static void checkModuleImportContext (Sema &S, Module *M, SourceLocation ImportLoc, DeclContext *DC, bool FromInclude=false)
 
static const ExportDeclgetEnclosingExportDecl (const Decl *D)
 Determine whether D is lexically within an export-declaration. More...
 
static bool checkExportedDeclContext (Sema &S, DeclContext *DC, SourceLocation BlockStart)
 Check that it's valid to export all the declarations in DC. More...
 
static llvm::Optional< UnnamedDeclKindgetUnnamedDeclKind (Decl *D)
 
unsigned getUnnamedDeclDiag (UnnamedDeclKind UDK, bool InBlock)
 
static void diagExportedUnnamedDecl (Sema &S, UnnamedDeclKind UDK, Decl *D, SourceLocation BlockStart)
 
static bool checkExportedDecl (Sema &S, Decl *D, SourceLocation BlockStart)
 Check that it's valid to export D. More...
 

Enumeration Type Documentation

◆ UnnamedDeclKind

enum UnnamedDeclKind
strong

Definition at line 587 of file SemaModule.cpp.

Function Documentation

◆ checkExportedDecl()

static bool checkExportedDecl ( Sema S,
Decl D,
SourceLocation  BlockStart 
)
static

◆ checkExportedDeclContext()

static bool checkExportedDeclContext ( Sema S,
DeclContext DC,
SourceLocation  BlockStart 
)
static

Check that it's valid to export all the declarations in DC.

Definition at line 680 of file SemaModule.cpp.

References checkExportedDecl(), and clang::DeclContext::decls().

Referenced by checkExportedDecl().

◆ checkModuleImportContext()

static void checkModuleImportContext ( Sema S,
Module M,
SourceLocation  ImportLoc,
DeclContext DC,
bool  FromInclude = false 
)
static

◆ diagExportedUnnamedDecl()

static void diagExportedUnnamedDecl ( Sema S,
UnnamedDeclKind  UDK,
Decl D,
SourceLocation  BlockStart 
)
static

◆ getEnclosingExportDecl()

static const ExportDecl* getEnclosingExportDecl ( const Decl D)
static

Determine whether D is lexically within an export-declaration.

Definition at line 334 of file SemaModule.cpp.

References clang::Decl::getLexicalDeclContext(), and clang::DeclContext::getLexicalParent().

◆ getUnnamedDeclDiag()

unsigned getUnnamedDeclDiag ( UnnamedDeclKind  UDK,
bool  InBlock 
)

Definition at line 609 of file SemaModule.cpp.

Referenced by diagExportedUnnamedDecl().

◆ getUnnamedDeclKind()

static llvm::Optional<UnnamedDeclKind> getUnnamedDeclKind ( Decl D)
static

Definition at line 596 of file SemaModule.cpp.

References clang::Asm, and clang::None.

Referenced by checkExportedDecl().