class ExternCContextDecl

Declaration

class ExternCContextDecl : public Decl, public DeclContext { /* full declaration omitted */ };

Description

Declaration context for names declared as extern "C" in C++. This is neither the semantic nor lexical context for such declarations, but is used to check for conflicts with other extern "C" declarations. Example: The semantic context of #1 is namespace N and its lexical context is the LinkageSpecDecl; the semantic context of #2 is namespace N and its lexical context is the TU. However, both declarations are also visible in the extern "C" context. The declaration at #3 finds it is a redeclaration of \c N::f through lookup in the extern "C" context.

Declared at: clang/include/clang/AST/Decl.h:220

Inherits from: Decl, DeclContext

Member Variables

Inherited from DeclContext:

protected
protected FirstDecl = nullptr
protected LastDecl = nullptr

Inherited from Decl:

protected NextInContextAndBits
protected Access
protected FromASTFile
protected IdentifierNamespace
protected CacheValidAndLinkage

Method Overview

  • public static clang::ExternCContextDecl * Create(const clang::ASTContext & C, clang::TranslationUnitDecl * TU)
  • private ExternCContextDecl(clang::TranslationUnitDecl * TU)
  • private virtual void anchor()
  • public static clang::ExternCContextDecl * castFromDeclContext(const clang::DeclContext * DC)
  • public static clang::DeclContext * castToDeclContext(const clang::ExternCContextDecl * D)
  • public static bool classof(const clang::Decl * D)
  • public static bool classofKind(clang::Decl::Kind K)

Inherited from DeclContext:

Inherited from Decl:

Methods

static clang::ExternCContextDecl* Create(
    const clang::ASTContext& C,
    clang::TranslationUnitDecl* TU)

Declared at: clang/include/clang/AST/Decl.h:228

Parameters

const clang::ASTContext& C
clang::TranslationUnitDecl* TU

ExternCContextDecl(clang::TranslationUnitDecl* TU)

Declared at: clang/include/clang/AST/Decl.h:221

Parameters

clang::TranslationUnitDecl* TU

virtual void anchor()

Declared at: clang/include/clang/AST/Decl.h:225

static clang::ExternCContextDecl*
castFromDeclContext(const clang::DeclContext* DC)

Declared at: clang/include/clang/AST/Decl.h:237

Parameters

const clang::DeclContext* DC

static clang::DeclContext* castToDeclContext(
    const clang::ExternCContextDecl* D)

Declared at: clang/include/clang/AST/Decl.h:234

Parameters

const clang::ExternCContextDecl* D

static bool classof(const clang::Decl* D)

Declared at: clang/include/clang/AST/Decl.h:232

Parameters

const clang::Decl* D

static bool classofKind(clang::Decl::Kind K)

Declared at: clang/include/clang/AST/Decl.h:233

Parameters

clang::Decl::Kind K