clang 10.0.0git

Classes | Macros | Functions | Variables
Stmt.cpp File Reference
`#include "clang/AST/Stmt.h"`
`#include "clang/AST/ASTContext.h"`
`#include "clang/AST/ASTDiagnostic.h"`
`#include "clang/AST/Decl.h"`
`#include "clang/AST/DeclGroup.h"`
`#include "clang/AST/Expr.h"`
`#include "clang/AST/ExprConcepts.h"`
`#include "clang/AST/ExprCXX.h"`
`#include "clang/AST/ExprObjC.h"`
`#include "clang/AST/ExprOpenMP.h"`
`#include "clang/AST/StmtCXX.h"`
`#include "clang/AST/StmtObjC.h"`
`#include "clang/AST/StmtOpenMP.h"`
`#include "clang/AST/Type.h"`
`#include "clang/Basic/CharInfo.h"`
`#include "clang/Basic/LLVM.h"`
`#include "clang/Basic/SourceLocation.h"`
`#include "clang/Basic/TargetInfo.h"`
`#include "clang/Lex/Token.h"`
`#include "llvm/ADT/SmallVector.h"`
`#include "llvm/ADT/StringExtras.h"`
`#include "llvm/ADT/StringRef.h"`
`#include "llvm/Support/Casting.h"`
`#include "llvm/Support/Compiler.h"`
`#include "llvm/Support/ErrorHandling.h"`
`#include "llvm/Support/MathExtras.h"`
`#include "llvm/Support/raw_ostream.h"`
`#include <algorithm>`
`#include <cassert>`
`#include <cstring>`
`#include <string>`
`#include <utility>`
`#include <type_traits>`
`#include "clang/AST/StmtNodes.inc"`
Include dependency graph for Stmt.cpp:

Go to the source code of this file.

## Classes
struct | StmtClassNameTable

## Macros
#define | ABSTRACT_STMT(STMT)
#define | STMT(CLASS, PARENT)
#define | INITLISTEXPR(CLASS, PARENT)
#define | ASSERT_IMPLEMENTS_children(type) (void) is_good(implements_children(&type::children))
#define | ASSERT_IMPLEMENTS_getBeginLoc(type) (void)is_good(implements_getBeginLoc(&type::getBeginLoc))
#define | ASSERT_IMPLEMENTS_getEndLoc(type) (void)is_good(implements_getEndLoc(&type::getEndLoc))
#define | ABSTRACT_STMT(type)
#define | STMT(type, base)
#define | ABSTRACT_STMT(type)
#define | STMT(type, base)
#define | ABSTRACT_STMT(type)
#define | STMT(type, base)
#define | ABSTRACT_STMT(type)
#define | STMT(type, base)
#define | ABSTRACT_STMT(type)
#define | STMT(type, base)

## Functions
static StmtClassNameTable & | getStmtInfoTableEntry (Stmt::StmtClass E)
static LLVM_ATTRIBUTE_UNUSED void | check_implementations ()
| Check whether the various Stmt classes implement their member functions. More...
static StringRef | copyIntoContext (const ASTContext &C, StringRef str)

## Variables
static struct StmtClassNameTable | StmtClassInfo [Stmt::lastStmtConstant+1]

## Macro Definition Documentation

## ◆ ABSTRACT_STMT [1/6]

#define ABSTRACT_STMT | ( |  | STMT | ) |

## ◆ ABSTRACT_STMT [2/6]

#define ABSTRACT_STMT | ( |  | type | ) |

## ◆ ABSTRACT_STMT [3/6]

#define ABSTRACT_STMT | ( |  | type | ) |

## ◆ ABSTRACT_STMT [4/6]

#define ABSTRACT_STMT | ( |  | type | ) |

## ◆ ABSTRACT_STMT [5/6]

#define ABSTRACT_STMT | ( |  | type | ) |

## ◆ ABSTRACT_STMT [6/6]

#define ABSTRACT_STMT | ( |  | type | ) |

## ◆ ASSERT_IMPLEMENTS_children

#define ASSERT_IMPLEMENTS_children | ( |  | type | ) | (void) is_good(implements_children(&type::children))

Definition at line 203 of file Stmt.cpp.

## ◆ ASSERT_IMPLEMENTS_getBeginLoc

#define ASSERT_IMPLEMENTS_getBeginLoc | ( |  | type | ) | (void)is_good(implements_getBeginLoc(&type::getBeginLoc))

Definition at line 205 of file Stmt.cpp.

## ◆ ASSERT_IMPLEMENTS_getEndLoc

#define ASSERT_IMPLEMENTS_getEndLoc | ( |  | type | ) | (void)is_good(implements_getEndLoc(&type::getEndLoc))

Definition at line 207 of file Stmt.cpp.

## ◆ INITLISTEXPR

#define INITLISTEXPR | ( |  | CLASS,
|  |  | PARENT
| ) |  |

Definition at line 95 of file Stmt.cpp.

## ◆ STMT [1/8]

#define STMT | ( |  | CLASS,
|  |  | PARENT
| ) |  |

Value:
StmtClassInfo[(unsigned)Stmt::CLASS##Class].Name = #CLASS; \
StmtClassInfo[(unsigned)Stmt::CLASS##Class].Size = sizeof(CLASS);
StmtClassInfo
static struct StmtClassNameTable StmtClassInfo[Stmt::lastStmtConstant+1]

Definition at line 91 of file Stmt.cpp.

## ◆ STMT [2/8]

#define STMT | ( |  | CLASS,
|  |  | PARENT
| ) |  |

Value:
static_assert(!std::is_polymorphic<CLASS>::value, \
#CLASS " should not be polymorphic!");

Definition at line 91 of file Stmt.cpp.

## ◆ STMT [3/8]

#define STMT | ( |  | CLASS,
|  |  | PARENT
| ) |  |

Value:
static_assert(std::is_trivially_destructible<CLASS>::value, \
#CLASS " should be trivially destructible!");

Definition at line 91 of file Stmt.cpp.

## ◆ STMT [4/8]

#define STMT | ( |  | type,
|  |  | base
| ) |  |

Value:
ASSERT_IMPLEMENTS_children(type); \
ASSERT_IMPLEMENTS_getBeginLoc(type); \
ASSERT_IMPLEMENTS_getEndLoc(type);
ASSERT_IMPLEMENTS_children
#define ASSERT_IMPLEMENTS_children(type)
Definition: Stmt.cpp:203
type

Definition at line 91 of file Stmt.cpp.

## ◆ STMT [5/8]

#define STMT | ( |  | type,
|  |  | base
| ) |  |

Value:
case Stmt::type##Class: \
return static_cast<type*>(this)->children();
clang::ast_matchers::type
const internal::VariadicAllOfMatcher< Type > type
Matches Types in the clang AST.
Definition: ASTMatchersInternal.cpp:638
clang::index::SymbolKind::Class
type
clang::children
child_range children()
Definition: OpenMPClause.h:3413

Definition at line 91 of file Stmt.cpp.

## ◆ STMT [6/8]

#define STMT | ( |  | type,
|  |  | base
| ) |  |

Value:
case Stmt::type##Class: \
return getSourceRangeImpl<type>(this, &type::getSourceRange);
clang::ast_matchers::type
const internal::VariadicAllOfMatcher< Type > type
Matches Types in the clang AST.
Definition: ASTMatchersInternal.cpp:638
clang::tooling::fixit::internal::getSourceRange
CharSourceRange getSourceRange(const SourceRange &Range)
Returns the token CharSourceRange corresponding to Range.
Definition: FixIt.h:32
clang::index::SymbolKind::Class

Definition at line 91 of file Stmt.cpp.

## ◆ STMT [7/8]

#define STMT | ( |  | type,
|  |  | base
| ) |  |

Value:
case Stmt::type##Class: \
return static_cast<const type *>(this)->getBeginLoc();
clang::ast_matchers::type
const internal::VariadicAllOfMatcher< Type > type
Matches Types in the clang AST.
Definition: ASTMatchersInternal.cpp:638
clang::index::SymbolKind::Class
type

Definition at line 91 of file Stmt.cpp.

## ◆ STMT [8/8]

#define STMT | ( |  | type,
|  |  | base
| ) |  |

Value:
case Stmt::type##Class: \
return static_cast<const type *>(this)->getEndLoc();
clang::ast_matchers::type
const internal::VariadicAllOfMatcher< Type > type
Matches Types in the clang AST.
Definition: ASTMatchersInternal.cpp:638
clang::index::SymbolKind::Class
type

Definition at line 91 of file Stmt.cpp.

## Function Documentation

## ◆ check_implementations()

static LLVM_ATTRIBUTE_UNUSED void check_implementations | ( |  | ) |
| inline static

Check whether the various Stmt classes implement their member functions.

Definition at line 215 of file Stmt.cpp.

## ◆ copyIntoContext()

static StringRef copyIntoContext | ( | const ASTContext & | C,
|  | StringRef | str
| ) |  |
| static

Definition at line 793 of file Stmt.cpp.

References clang::C, clang::AsmStmt::Exprs, clang::Stmt::IfStmtBits, clang::AsmStmt::NumClobbers, clang::AsmStmt::NumInputs, clang::AsmStmt::NumOutputs, and clang::Stmt::Stmt().

## ◆ getStmtInfoTableEntry()

static StmtClassNameTable& getStmtInfoTableEntry | ( | Stmt::StmtClass | E | ) |
| static

Definition at line 55 of file Stmt.cpp.

References Initialized, and StmtClassInfo.

Referenced by clang::Stmt::addStmtClass(), clang::Stmt::getStmtClassName(), and clang::Stmt::PrintStats().

## Variable Documentation

## ◆ StmtClassInfo

struct StmtClassNameTable StmtClassInfo[Stmt::lastStmtConstant+1]
| static

Referenced by getStmtInfoTableEntry(), and clang::Stmt::PrintStats().