class CoverageSourceInfo

Declaration

class CoverageSourceInfo : public PPCallbacks,
                           public CommentHandler,
                           public EmptylineHandler { /* full declaration omitted */ };

Description

Stores additional source code information like skipped ranges which is required by the coverage mapping generator and is obtained from the preprocessor.

Declared at: clang/lib/CodeGen/CoverageMappingGen.h:62

Inherits from: PPCallbacks, CommentHandler, EmptylineHandler

Member Variables

private std::vector<SkippedRange> SkippedRanges
private clang::SourceManager& SourceMgr
public clang::SourceLocation PrevTokLoc

Method Overview

Inherited from EmptylineHandler:

Inherited from CommentHandler:

Inherited from PPCallbacks:

Methods

void AddSkippedRange(clang::SourceRange Range,
                     SkippedRange::Kind RangeKind)

Declared at: clang/lib/CodeGen/CoverageMappingGen.h:79

Parameters

clang::SourceRange Range
SkippedRange::Kind RangeKind

CoverageSourceInfo(
    clang::SourceManager& SourceMgr)

Declared at: clang/lib/CodeGen/CoverageMappingGen.h:75

Parameters

clang::SourceManager& SourceMgr

bool HandleComment(clang::Preprocessor& PP,
                   clang::SourceRange Range)

Declared at: clang/lib/CodeGen/CoverageMappingGen.h:85

Parameters

clang::Preprocessor& PP
clang::SourceRange Range

void HandleEmptyline(clang::SourceRange Range)

Declared at: clang/lib/CodeGen/CoverageMappingGen.h:83

Parameters

clang::SourceRange Range

void SourceRangeSkipped(
    clang::SourceRange Range,
    clang::SourceLocation EndifLoc)

Description

Hook called when a source range is skipped.

Declared at: clang/lib/CodeGen/CoverageMappingGen.h:81

Parameters

clang::SourceRange Range
The SourceRange that was skipped. The range begins at the # if/ # else directive and ends after the # endif/ # else directive.
clang::SourceLocation EndifLoc
The end location of the 'endif' token, which may precede the range skipped by the directive (e.g excluding comments after an 'endif').

std::vector<SkippedRange>& getSkippedRanges()

Declared at: clang/lib/CodeGen/CoverageMappingGen.h:77

void updateNextTokLoc(clang::SourceLocation Loc)

Declared at: clang/lib/CodeGen/CoverageMappingGen.h:87

Parameters

clang::SourceLocation Loc