clang 20.0.0git
Public Member Functions | List of all members
clang::tooling::Range Class Reference

A source range independent of the SourceManager. More...

#include "clang/Tooling/Core/Replacement.h"

Public Member Functions

 Range ()=default
 
 Range (unsigned Offset, unsigned Length)
 
unsigned getOffset () const
 Accessors.
 
unsigned getLength () const
 
Range Predicates

Whether this range overlaps with RHS or not.

bool overlapsWith (Range RHS) const
 
bool contains (Range RHS) const
 Whether this range contains RHS or not.
 
bool operator== (const Range &RHS) const
 Whether this range equals to RHS or not.
 

Detailed Description

A source range independent of the SourceManager.

Definition at line 44 of file Replacement.h.

Constructor & Destructor Documentation

◆ Range() [1/2]

clang::tooling::Range::Range ( )
default

◆ Range() [2/2]

clang::tooling::Range::Range ( unsigned  Offset,
unsigned  Length 
)
inline

Definition at line 47 of file Replacement.h.

Member Function Documentation

◆ contains()

bool clang::tooling::Range::contains ( Range  RHS) const
inline

Whether this range contains RHS or not.

Definition at line 63 of file Replacement.h.

◆ getLength()

unsigned clang::tooling::Range::getLength ( ) const
inline

◆ getOffset()

unsigned clang::tooling::Range::getOffset ( ) const
inline

◆ operator==()

bool clang::tooling::Range::operator== ( const Range RHS) const
inline

Whether this range equals to RHS or not.

Definition at line 69 of file Replacement.h.

References getLength(), and getOffset().

◆ overlapsWith()

bool clang::tooling::Range::overlapsWith ( Range  RHS) const
inline

Definition at line 58 of file Replacement.h.

Referenced by clang::tooling::Replacements::add().


The documentation for this class was generated from the following file: