class MSDependentExistsStmt

Declaration

class MSDependentExistsStmt : public Stmt { /* full declaration omitted */ };

Description

Representation of a Microsoft __if_exists or __if_not_exists statement with a dependent name. The __if_exists statement can be used to include a sequence of statements in the program only when a particular dependent name does not exist. For example: Similarly, the __if_not_exists statement can be used to include the statements when a particular name does not exist. Note that this statement only captures __if_exists and __if_not_exists statements whose name is dependent. All non-dependent cases are handled directly in the parser, so that they don't introduce a new scope. Clang introduces scopes in the dependent case to keep names inside the compound statement from leaking out into the surround statements, which would compromise the template instantiation model. This behavior differs from Visual C++ (which never introduces a scope), but is a fairly reasonable approximation of the VC++ behavior.

Declared at: clang/include/clang/AST/StmtCXX.h:252

Inherits from: Stmt

Member Variables

private clang::SourceLocation KeywordLoc
private bool IsIfExists
private clang::NestedNameSpecifierLoc QualifierLoc
private clang::DeclarationNameInfo NameInfo
private clang::Stmt* SubStmt

Inherited from Stmt:

protected

Method Overview

  • public MSDependentExistsStmt(clang::SourceLocation KeywordLoc, bool IsIfExists, clang::NestedNameSpecifierLoc QualifierLoc, clang::DeclarationNameInfo NameInfo, clang::CompoundStmt * SubStmt)
  • public clang::Stmt::child_range children()
  • public clang::Stmt::const_child_range children() const
  • public static bool classof(const clang::Stmt * T)
  • public clang::SourceLocation getBeginLoc() const
  • public clang::SourceLocation getEndLoc() const
  • public clang::SourceLocation getKeywordLoc() const
  • public clang::DeclarationNameInfo getNameInfo() const
  • public clang::NestedNameSpecifierLoc getQualifierLoc() const
  • public clang::CompoundStmt * getSubStmt() const
  • public bool isIfExists() const
  • public bool isIfNotExists() const

Inherited from Stmt:

Methods

MSDependentExistsStmt(
    clang::SourceLocation KeywordLoc,
    bool IsIfExists,
    clang::NestedNameSpecifierLoc QualifierLoc,
    clang::DeclarationNameInfo NameInfo,
    clang::CompoundStmt* SubStmt)

Declared at: clang/include/clang/AST/StmtCXX.h:263

Parameters

clang::SourceLocation KeywordLoc
bool IsIfExists
clang::NestedNameSpecifierLoc QualifierLoc
clang::DeclarationNameInfo NameInfo
clang::CompoundStmt* SubStmt

clang::Stmt::child_range children()

Declared at: clang/include/clang/AST/StmtCXX.h:301

clang::Stmt::const_child_range children() const

Declared at: clang/include/clang/AST/StmtCXX.h:305

static bool classof(const clang::Stmt* T)

Declared at: clang/include/clang/AST/StmtCXX.h:309

Parameters

const clang::Stmt* T

clang::SourceLocation getBeginLoc() const

Declared at: clang/include/clang/AST/StmtCXX.h:296

clang::SourceLocation getEndLoc() const

Declared at: clang/include/clang/AST/StmtCXX.h:297

clang::SourceLocation getKeywordLoc() const

Description

Retrieve the location of the __if_exists or __if_not_exists keyword.

Declared at: clang/include/clang/AST/StmtCXX.h:274

clang::DeclarationNameInfo getNameInfo() const

Description

Retrieve the name of the entity we're testing for, along with location information

Declared at: clang/include/clang/AST/StmtCXX.h:288

clang::NestedNameSpecifierLoc getQualifierLoc()
    const

Description

Retrieve the nested-name-specifier that qualifies this name, if any.

Declared at: clang/include/clang/AST/StmtCXX.h:284

clang::CompoundStmt* getSubStmt() const

Description

Retrieve the compound statement that will be included in the program only if the existence of the symbol matches the initial keyword.

Declared at: clang/include/clang/AST/StmtCXX.h:292

bool isIfExists() const

Description

Determine whether this is an __if_exists statement.

Declared at: clang/include/clang/AST/StmtCXX.h:277

bool isIfNotExists() const

Description

Determine whether this is an __if_exists statement.

Declared at: clang/include/clang/AST/StmtCXX.h:280