clang 22.0.0git
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

Referenced by contains(), operator==(), and overlapsWith().

◆ 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.

References Range().

◆ getLength()

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

Definition at line 52 of file Replacement.h.

Referenced by combineAndSortRanges(), and operator==().

◆ getOffset()

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

Accessors.

Definition at line 51 of file Replacement.h.

Referenced by combineAndSortRanges(), and operator==().

◆ 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(), getOffset(), and Range().

◆ overlapsWith()

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

Definition at line 58 of file Replacement.h.

References Range().

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


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