From 988faf87f8067646431dca3e238147f316d84bcb Mon Sep 17 00:00:00 2001 From: Vedant Kumar Date: Wed, 18 Oct 2017 18:52:27 +0000 Subject: [llvm-cov] Highlight gaps in consecutive uncovered regions llvm-cov typically doesn't highlight gap segments, but it should if the gap occurs after an uncovered region in order to preserve continuity. llvm-svn: 316107 --- llvm/tools/llvm-cov/SourceCoverageViewText.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'llvm/tools/llvm-cov/SourceCoverageViewText.cpp') diff --git a/llvm/tools/llvm-cov/SourceCoverageViewText.cpp b/llvm/tools/llvm-cov/SourceCoverageViewText.cpp index e4ac1fd5bfd..6990ed0f160 100644 --- a/llvm/tools/llvm-cov/SourceCoverageViewText.cpp +++ b/llvm/tools/llvm-cov/SourceCoverageViewText.cpp @@ -121,7 +121,8 @@ void SourceCoverageViewText::renderLine( Col = End; if (Col == ExpansionCol) Highlight = raw_ostream::CYAN; - else if (!S->IsGapRegion && S->HasCount && S->Count == 0) + else if ((!S->IsGapRegion || Highlight == raw_ostream::RED) && + S->HasCount && S->Count == 0) Highlight = raw_ostream::RED; else Highlight = None; -- cgit v1.2.3