clang  14.0.0git
Namespaces | Typedefs | Functions
RangeSelector.h File Reference
#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>
Include dependency graph for RangeSelector.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 clang
 
 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. More...
 
RangeSelector clang::transformer::encloseNodes (std::string BeginID, std::string EndID)
 Convenience version of range where end-points are bound nodes. More...
 
RangeSelector clang::transformer::range (RangeSelector Begin, RangeSelector End)
 DEPRECATED. Use enclose. More...
 
RangeSelector clang::transformer::range (std::string BeginID, std::string EndID)
 DEPRECATED. Use encloseNodes. More...
 
RangeSelector clang::transformer::before (RangeSelector Selector)
 Selects the (empty) range [B,B) when Selector selects the range [B,E). More...
 
RangeSelector clang::transformer::after (RangeSelector Selector)
 Selects the point immediately following Selector. More...
 
RangeSelector clang::transformer::between (RangeSelector R1, RangeSelector R2)
 Selects the range between R1 and `R2. More...
 
RangeSelector clang::transformer::node (std::string ID)
 Selects a node, including trailing semicolon, if any (for declarations and non-expression statements). More...
 
RangeSelector clang::transformer::statement (std::string ID)
 Selects a node, including trailing semicolon (always). More...
 
RangeSelector clang::transformer::member (std::string ID)
 Given a MemberExpr, selects the member token. More...
 
RangeSelector clang::transformer::name (std::string ID)
 Given a node with a "name", (like NamedDecl, DeclRefExpr, CxxCtorInitializer, and TypeLoc) selects the name's token. More...
 
RangeSelector clang::transformer::callArgs (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. More...
 
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. More...
 

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.