clang 20.0.0git
Namespaces | Typedefs | Functions
RangeSelector.h File Reference

Defines a combinator library supporting the definition of selectors, which select source ranges based on (bound) AST nodes. More...

#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Tooling/Transformer/MatchConsumer.h"
#include "llvm/Support/Error.h"
#include <functional>
#include <string>

Go to the source code of this file.

Namespaces

namespace  clang
 The JSON file list parser is used to communicate input to InstallAPI.
 
namespace  clang::transformer
 

Typedefs

using clang::transformer::RangeSelector = MatchConsumer< CharSourceRange >
 

Functions

RangeSelector clang::transformer::charRange (CharSourceRange R)
 
RangeSelector clang::transformer::enclose (RangeSelector Begin, RangeSelector End)
 Selects from the start of Begin and to the end of End.
 
RangeSelector clang::transformer::encloseNodes (std::string BeginID, std::string EndID)
 Convenience version of range where end-points are bound nodes.
 
RangeSelector clang::transformer::range (RangeSelector Begin, RangeSelector End)
 DEPRECATED. Use enclose.
 
RangeSelector clang::transformer::range (std::string BeginID, std::string EndID)
 DEPRECATED. Use encloseNodes.
 
RangeSelector clang::transformer::before (RangeSelector Selector)
 Selects the (empty) range [B,B) when Selector selects the range [B,E).
 
RangeSelector clang::transformer::after (RangeSelector Selector)
 Selects the point immediately following Selector.
 
RangeSelector clang::transformer::between (RangeSelector R1, RangeSelector R2)
 Selects the range between R1 and `R2.
 
RangeSelector clang::transformer::node (std::string ID)
 Selects a node, including trailing semicolon, if any (for declarations and non-expression statements).
 
RangeSelector clang::transformer::statement (std::string ID)
 Selects a node, including trailing semicolon (always).
 
RangeSelector clang::transformer::member (std::string ID)
 Given a MemberExpr, selects the member token.
 
RangeSelector clang::transformer::name (std::string ID)
 Given a node with a "name", (like NamedDecl, DeclRefExpr, CxxCtorInitializer, and TypeLoc) selects the name's token.
 
RangeSelector clang::transformer::callArgs (std::string ID)
 
RangeSelector clang::transformer::constructExprArgs (std::string ID)
 
RangeSelector clang::transformer::statements (std::string ID)
 
RangeSelector clang::transformer::initListElements (std::string ID)
 
RangeSelector clang::transformer::elseBranch (std::string ID)
 Given an \IfStmt (bound to ID), selects the range of the else branch, starting from the else keyword.
 
RangeSelector clang::transformer::expansion (RangeSelector S)
 Selects the range from which S was expanded (possibly along with other source), if S is an expansion, and S itself, otherwise.
 

Detailed Description

Defines a combinator library supporting the definition of selectors, which select source ranges based on (bound) AST nodes.

Definition in file RangeSelector.h.