Skip to content

Commit

Permalink
[analyzer] PathDiagnosticPopUpPiece: working with CharSourceRange
Browse files Browse the repository at this point in the history
Summary: Sometimes we are at character boundaries so past the token-range.
llvm-svn: 362632
  • Loading branch information
Csaba Dabis committed Jun 5, 2019
1 parent 8b83a9c commit 84cfca0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ HandlePopUpPieceStartTag(Rewriter &R,
for (const auto &Range : PopUpRanges) {
html::HighlightRange(R, Range.getBegin(), Range.getEnd(), "",
"<table class='variable_popup'><tbody>",
/*IsTokenRange=*/true);
/*IsTokenRange=*/false);
}
}

Expand Down Expand Up @@ -644,12 +644,12 @@ static void HandlePopUpPieceEndTag(Rewriter &R,
Out << "</tbody></table></span>";
html::HighlightRange(R, Range.getBegin(), Range.getEnd(),
"<span class='variable'>", Buf.c_str(),
/*IsTokenRange=*/true);
/*IsTokenRange=*/false);

// Otherwise inject just the new row at the end of the range.
} else {
html::HighlightRange(R, Range.getBegin(), Range.getEnd(), "", Buf.c_str(),
/*IsTokenRange=*/true);
/*IsTokenRange=*/false);
}
}

Expand Down

0 comments on commit 84cfca0

Please sign in to comment.