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
- public void AddSkippedRange(clang::SourceRange Range, SkippedRange::Kind RangeKind)
- public CoverageSourceInfo(clang::SourceManager & SourceMgr)
- public bool HandleComment(clang::Preprocessor & PP, clang::SourceRange Range)
- public void HandleEmptyline(clang::SourceRange Range)
- public void SourceRangeSkipped(clang::SourceRange Range, clang::SourceLocation EndifLoc)
- public std::vector<SkippedRange> & getSkippedRanges()
- public void updateNextTokLoc(clang::SourceLocation Loc)
Inherited from EmptylineHandler:
Inherited from CommentHandler:
Inherited from PPCallbacks:
- public Defined
- public Elif
- public Elifdef
- public Elifdef
- public Elifndef
- public Elifndef
- public Else
- public EndOfMainFile
- public Endif
- public EnteredSubmodule
- public FileChanged
- public FileSkipped
- public HasInclude
- public Ident
- public If
- public Ifdef
- public Ifndef
- public InclusionDirective
- public LeftSubmodule
- public LexedFileChanged
- public MacroDefined
- public MacroExpands
- public MacroUndefined
- public PragmaAssumeNonNullBegin
- public PragmaAssumeNonNullEnd
- public PragmaComment
- public PragmaDebug
- public PragmaDetectMismatch
- public PragmaDiagnostic
- public PragmaDiagnosticPop
- public PragmaDiagnosticPush
- public PragmaDirective
- public PragmaExecCharsetPop
- public PragmaExecCharsetPush
- public PragmaMark
- public PragmaMessage
- public PragmaOpenCLExtension
- public PragmaWarning
- public PragmaWarningPop
- public PragmaWarningPush
- public SourceRangeSkipped
- public moduleImport
Methods
¶void AddSkippedRange(clang::SourceRange Range,
SkippedRange::Kind RangeKind)
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)
CoverageSourceInfo(
clang::SourceManager& SourceMgr)
Declared at: clang/lib/CodeGen/CoverageMappingGen.h:75
Parameters
- clang::SourceManager& SourceMgr
¶bool HandleComment(clang::Preprocessor& PP,
clang::SourceRange Range)
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)
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)
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()
std::vector<SkippedRange>& getSkippedRanges()
Declared at: clang/lib/CodeGen/CoverageMappingGen.h:77
¶void updateNextTokLoc(clang::SourceLocation Loc)
void updateNextTokLoc(clang::SourceLocation Loc)
Declared at: clang/lib/CodeGen/CoverageMappingGen.h:87