clang: lib/AST/ByteCode/Source.cpp Source File (original) (raw)

1

2

3

4

5

6

7

8

11

12using namespace clang;

14

19 return S->getBeginLoc();

23}

24

29 return S->getSourceRange();

33}

34

36 if (const auto *S = dyn_cast_if_present<const Stmt *>(Source))

37 return dyn_cast(S);

38 return nullptr;

39}

40

43 return E;

44 return nullptr;

45}

46

49}

50

53}

Decl - This represents one declaration (or definition), e.g.

SourceLocation getBeginLoc() const LLVM_READONLY

virtual SourceRange getSourceRange() const LLVM_READONLY

Source range that this declaration covers.

This represents one expression.

SourceLocation getExprLoc() const LLVM_READONLY

getExprLoc - Return the preferred location for the arrow when diagnosing a problem with a generic exp...

Encodes a location in the source.

A trivial tuple used to represent a source range.

Stmt - This represents one statement.

SourceRange getSourceRange() const LLVM_READONLY

SourceLocation tokens are not useful in isolation - they are low level value objects created/interpre...

Pointer into the code segment.

const Decl * asDecl() const

const Expr * asExpr() const

const Stmt * asStmt() const

SourceLocation getLoc() const

SourceRange getRange() const

virtual SourceInfo getSource(const Function *F, CodePtr PC) const =0

Returns source information for a given PC in a function.

SourceLocation getLocation(const Function *F, CodePtr PC) const

Returns the location from which an opcode originates.

SourceRange getRange(const Function *F, CodePtr PC) const

const Expr * getExpr(const Function *F, CodePtr PC) const

Returns the expression if an opcode belongs to one, null otherwise.

The JSON file list parser is used to communicate input to InstallAPI.