clang 20.0.0git
Static Public Member Functions | Public Attributes | List of all members
clang::ParsedSourceRange Struct Reference

A source range that has been parsed on the command line. More...

#include "clang/Frontend/CommandLineSourceLoc.h"

Static Public Member Functions

static std::optional< ParsedSourceRangefromString (StringRef Str)
 Returns a parsed source range from a string or std::nullopt if the string is invalid.
 

Public Attributes

std::string FileName
 
std::pair< unsigned, unsignedBegin
 The starting location of the range.
 
std::pair< unsigned, unsignedEnd
 The ending location of the range.
 

Detailed Description

A source range that has been parsed on the command line.

Definition at line 62 of file CommandLineSourceLoc.h.

Member Function Documentation

◆ fromString()

static std::optional< ParsedSourceRange > clang::ParsedSourceRange::fromString ( StringRef  Str)
inlinestatic

Returns a parsed source range from a string or std::nullopt if the string is invalid.

These source string has the following format:

file:start_line:start_column[-end_line:end_column]

If the end line and column are omitted, the starting line and columns are used as the end values.

Definition at line 80 of file CommandLineSourceLoc.h.

References Begin, and clang::ParsedSourceLocation::FromString().

Member Data Documentation

◆ Begin

std::pair<unsigned, unsigned> clang::ParsedSourceRange::Begin

The starting location of the range.

The first element is the line and the second element is the column.

Definition at line 66 of file CommandLineSourceLoc.h.

Referenced by fromString().

◆ End

std::pair<unsigned, unsigned> clang::ParsedSourceRange::End

The ending location of the range.

The first element is the line and the second element is the column.

Definition at line 69 of file CommandLineSourceLoc.h.

◆ FileName

std::string clang::ParsedSourceRange::FileName

Definition at line 63 of file CommandLineSourceLoc.h.


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