LLVM  13.0.0git
Public Member Functions | Public Attributes | List of all members
llvm::SMRange Class Reference

Represents a range in source code. More...

#include "llvm/Support/SMLoc.h"

Collaboration diagram for llvm::SMRange:
Collaboration graph
[legend]

Public Member Functions

 SMRange ()=default
 
 SMRange (NoneType)
 
 SMRange (SMLoc St, SMLoc En)
 
bool isValid () const
 

Public Attributes

SMLoc Start
 
SMLoc End
 

Detailed Description

Represents a range in source code.

SMRange is implemented using a half-open range, as is the convention in C++. In the string "abc", the range [1,3) represents the substring "bc", and the range [2,2) represents an empty range between the characters "b" and "c".

Definition at line 48 of file SMLoc.h.

Constructor & Destructor Documentation

◆ SMRange() [1/3]

llvm::SMRange::SMRange ( )
default

◆ SMRange() [2/3]

llvm::SMRange::SMRange ( NoneType  )
inline

Definition at line 53 of file SMLoc.h.

◆ SMRange() [3/3]

llvm::SMRange::SMRange ( SMLoc  St,
SMLoc  En 
)
inline

Definition at line 54 of file SMLoc.h.

References assert(), End, llvm::SMLoc::isValid(), and Start.

Member Function Documentation

◆ isValid()

bool llvm::SMRange::isValid ( ) const
inline

Definition at line 59 of file SMLoc.h.

References llvm::SMLoc::isValid(), and Start.

Member Data Documentation

◆ End

SMLoc llvm::SMRange::End

Definition at line 50 of file SMLoc.h.

Referenced by llvm::SMFixIt::operator<(), and SMRange().

◆ Start

SMLoc llvm::SMRange::Start

Definition at line 50 of file SMLoc.h.

Referenced by isValid(), llvm::SMFixIt::operator<(), llvm::yaml::Stream::printError(), and SMRange().


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