[analyzer] PathDiagnosticPopUpPiece: working with CharSourceRange
authorCsaba Dabis <dabis.csaba98@gmail.com>
Wed, 5 Jun 2019 18:55:39 +0000 (18:55 +0000)
committerCsaba Dabis <dabis.csaba98@gmail.com>
Wed, 5 Jun 2019 18:55:39 +0000 (18:55 +0000)
Summary: Sometimes we are at character boundaries so past the token-range.
llvm-svn: 362632

clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp

index 8ede3f1..64c4269 100644 (file)
@@ -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);
   }
 }
 
@@ -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);
   }
 }