clang  7.0.0svn
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. More...
 
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. More...
 
bool operator== (const Range &RHS) const
 Whether this range equals to RHS or not. More...
 

Detailed Description

A source range independent of the SourceManager.

Definition at line 45 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 48 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 64 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 70 of file Replacement.h.

References getLength(), and getOffset().

Referenced by clang::tooling::ReplacementError::getExistingReplacement().

◆ overlapsWith()

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

Definition at line 59 of file Replacement.h.


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