clang 22.0.0git
RangeSelector.cpp File Reference
#include "clang/Tooling/Transformer/RangeSelector.h"
#include "clang/AST/Expr.h"
#include "clang/AST/TypeLoc.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Lex/Lexer.h"
#include "clang/Tooling/Transformer/SourceCode.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Errc.h"
#include "llvm/Support/Error.h"
#include <string>
#include <utility>

Go to the source code of this file.

Typedefs

using MatchResult = MatchFinder::MatchResult

Functions

static Error invalidArgumentError (Twine Message)
static Error typeError (StringRef ID, const ASTNodeKind &Kind)
static Error typeError (StringRef ID, const ASTNodeKind &Kind, Twine ExpectedType)
static Error missingPropertyError (StringRef ID, Twine Description, StringRef Property)
static Expected< DynTypedNodegetNode (const ast_matchers::BoundNodes &Nodes, StringRef ID)
static SourceLocation findPreviousTokenStart (SourceLocation Start, const SourceManager &SM, const LangOptions &LangOpts)
static SourceLocation findPreviousTokenKind (SourceLocation Start, const SourceManager &SM, const LangOptions &LangOpts, tok::TokenKind TK)

Typedef Documentation

◆ MatchResult

using MatchResult = MatchFinder::MatchResult

Definition at line 29 of file RangeSelector.cpp.

Function Documentation

◆ findPreviousTokenKind()

◆ findPreviousTokenStart()

◆ getNode()

◆ invalidArgumentError()

Error invalidArgumentError ( Twine Message)
static

◆ missingPropertyError()

Error missingPropertyError ( StringRef ID,
Twine Description,
StringRef Property )
static

Definition at line 47 of file RangeSelector.cpp.

References clang::Error, and invalidArgumentError().

Referenced by clang::transformer::name().

◆ typeError() [1/2]

Error typeError ( StringRef ID,
const ASTNodeKind & Kind )
static

Definition at line 35 of file RangeSelector.cpp.

References clang::Error, and invalidArgumentError().

Referenced by clang::transformer::member(), and clang::transformer::name().

◆ typeError() [2/2]

Error typeError ( StringRef ID,
const ASTNodeKind & Kind,
Twine ExpectedType )
static

Definition at line 40 of file RangeSelector.cpp.

References clang::Error, and invalidArgumentError().