clang 17.0.0git
|
#include "clang/AST/ASTConsumer.h"
#include "clang/Lex/HeaderSearch.h"
#include "clang/Lex/Preprocessor.h"
#include "clang/Sema/SemaInternal.h"
#include <optional>
Go to the source code of this file.
Functions | |
static void | checkModuleImportContext (Sema &S, Module *M, SourceLocation ImportLoc, DeclContext *DC, bool FromInclude=false) |
static std::string | stringFromPath (ModuleIdPath Path) |
static bool | DiagReservedModuleName (Sema &S, const IdentifierInfo *II, SourceLocation Loc) |
Tests whether the given identifier is reserved as a module name and diagnoses if it is. | |
static const ExportDecl * | getEnclosingExportDecl (const Decl *D) |
Determine whether D is lexically within an export-declaration. | |
static bool | checkExportedDeclContext (Sema &S, DeclContext *DC, SourceLocation BlockStart) |
Check that it's valid to export all the declarations in DC . | |
static std::optional< UnnamedDeclKind > | getUnnamedDeclKind (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 . | |
|
static |
Check that it's valid to export D
.
Definition at line 882 of file SemaModule.cpp.
References bool, checkExportedDeclContext(), clang::Sema::Diag(), diagExportedUnnamedDecl(), getUnnamedDeclKind(), clang::InternalLinkage, clang::SourceLocation::isValid(), clang::ModuleLinkage, and clang::Target.
Referenced by clang::Sema::ActOnFinishExportDecl(), and checkExportedDeclContext().
|
static |
Check that it's valid to export all the declarations in DC
.
Definition at line 932 of file SemaModule.cpp.
References checkExportedDecl(), and clang::DeclContext::decls().
Referenced by checkExportedDecl().
|
static |
Definition at line 23 of file SemaModule.cpp.
References clang::Sema::Diag(), clang::Module::getFullModuleName(), clang::DeclContext::getParent(), clang::Module::IsExternC, clang::SourceLocation::isInvalid(), clang::Sema::isModuleVisible(), clang::SourceLocation::isValid(), clang::LinkageSpecDecl::lang_c, and clang::LinkageSpecDecl::lang_cxx.
Referenced by clang::Sema::ActOnModuleBegin(), clang::Sema::ActOnModuleImport(), and clang::Sema::ActOnModuleInclude().
|
static |
Definition at line 873 of file SemaModule.cpp.
References clang::Sema::Diag(), clang::Decl::getLocation(), getUnnamedDeclDiag(), and clang::SourceLocation::isValid().
Referenced by clang::Sema::ActOnFinishExportDecl(), and checkExportedDecl().
|
static |
Tests whether the given identifier is reserved as a module name and diagnoses if it is.
Returns true if a diagnostic is emitted and false otherwise.
Definition at line 139 of file SemaModule.cpp.
References clang::Sema::Diag(), clang::Sema::getLangOpts(), clang::Sema::getSourceManager(), clang::Invalid, clang::SourceManager::isInSystemHeader(), clang::IdentifierInfo::isReserved(), clang::IdentifierInfo::isStr(), and clang::NotReserved.
Referenced by clang::Sema::ActOnModuleDecl().
|
static |
Determine whether D
is lexically within an export-declaration.
Definition at line 536 of file SemaModule.cpp.
References clang::Decl::getLexicalDeclContext(), and clang::DeclContext::getLexicalParent().
Referenced by clang::Sema::ActOnModuleImport(), and clang::Sema::ActOnStartExportDecl().
Definition at line 846 of file SemaModule.cpp.
Referenced by diagExportedUnnamedDecl().
|
static |
Definition at line 833 of file SemaModule.cpp.
Referenced by checkExportedDecl().
|
static |
Definition at line 62 of file SemaModule.cpp.
Referenced by clang::Sema::ActOnModuleDecl(), and clang::Sema::ActOnModuleImport().