]> granicus.if.org Git - clang/commitdiff
[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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@362632 91177308-0d34-0410-b5e6-96231b3b80d8

lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp

index 8ede3f15e60f78b244e61aa6e96321bb6f5a56f5..64c42699fcf3c2150aa5b2d53707e6354ded0a38 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);
   }
 }