diff options
Diffstat (limited to 'llvm/utils/FileCheck/FileCheck.cpp')
-rw-r--r-- | llvm/utils/FileCheck/FileCheck.cpp | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/llvm/utils/FileCheck/FileCheck.cpp b/llvm/utils/FileCheck/FileCheck.cpp index d9cad13..879a383 100644 --- a/llvm/utils/FileCheck/FileCheck.cpp +++ b/llvm/utils/FileCheck/FileCheck.cpp @@ -313,8 +313,7 @@ static void BuildInputAnnotations(const std::vector<FileCheckDiag> &Diags, Label.flush(); LabelWidth = std::max((std::string::size_type)LabelWidth, A.Label.size()); - MarkerStyle Marker = GetMarker(DiagItr->MatchTy); - A.Marker = Marker; + A.Marker = GetMarker(DiagItr->MatchTy); A.FoundAndExpectedMatch = DiagItr->MatchTy == FileCheckDiag::MatchFoundAndExpected; @@ -333,28 +332,25 @@ static void BuildInputAnnotations(const std::vector<FileCheckDiag> &Diags, assert(DiagItr->InputStartLine < DiagItr->InputEndLine && "expected input range not to be inverted"); A.InputEndCol = UINT_MAX; - A.Marker.Note = ""; Annotations.push_back(A); for (unsigned L = DiagItr->InputStartLine + 1, E = DiagItr->InputEndLine; L <= E; ++L) { // If a range ends before the first column on a line, then it has no // characters on that line, so there's nothing to render. - if (DiagItr->InputEndCol == 1 && L == E) { - Annotations.back().Marker.Note = Marker.Note; + if (DiagItr->InputEndCol == 1 && L == E) break; - } InputAnnotation B; B.CheckLine = A.CheckLine; B.CheckDiagIndex = A.CheckDiagIndex; B.Label = A.Label; B.InputLine = L; - B.Marker = Marker; + B.Marker = A.Marker; B.Marker.Lead = '~'; + B.Marker.Note = ""; B.InputStartCol = 1; - if (L != E) { + if (L != E) B.InputEndCol = UINT_MAX; - B.Marker.Note = ""; - } else + else B.InputEndCol = DiagItr->InputEndCol; B.FoundAndExpectedMatch = A.FoundAndExpectedMatch; Annotations.push_back(B); |