clang
3.7.0
|
Representation of a Microsoft __if_exists or __if_not_exists statement with a dependent name. More...
#include <StmtCXX.h>
Public Member Functions | |
MSDependentExistsStmt (SourceLocation KeywordLoc, bool IsIfExists, NestedNameSpecifierLoc QualifierLoc, DeclarationNameInfo NameInfo, CompoundStmt *SubStmt) | |
SourceLocation | getKeywordLoc () const |
Retrieve the location of the __if_exists or __if_not_exists keyword. More... | |
bool | isIfExists () const |
Determine whether this is an __if_exists statement. More... | |
bool | isIfNotExists () const |
Determine whether this is an __if_exists statement. More... | |
NestedNameSpecifierLoc | getQualifierLoc () const |
Retrieve the nested-name-specifier that qualifies this name, if any. More... | |
DeclarationNameInfo | getNameInfo () const |
Retrieve the name of the entity we're testing for, along with location information. More... | |
CompoundStmt * | getSubStmt () const |
Retrieve the compound statement that will be included in the program only if the existence of the symbol matches the initial keyword. More... | |
SourceLocation | getLocStart () const LLVM_READONLY |
SourceLocation | getLocEnd () const LLVM_READONLY |
child_range | children () |
Static Public Member Functions | |
static bool | classof (const Stmt *T) |
Friends | |
class | ASTReader |
class | ASTStmtReader |
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.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
friend |