[PATCH] D148951: [dataflow] HTMLLogger: fix off-by-one in the BB listing

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 24 06:57:08 PDT 2023


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG271a73dae32f: [dataflow] HTMLLogger: fix off-by-one in the BB listing (authored by sammccall).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D148951/new/

https://reviews.llvm.org/D148951

Files:
  clang/lib/Analysis/FlowSensitive/HTMLLogger.html


Index: clang/lib/Analysis/FlowSensitive/HTMLLogger.html
===================================================================
--- clang/lib/Analysis/FlowSensitive/HTMLLogger.html
+++ clang/lib/Analysis/FlowSensitive/HTMLLogger.html
@@ -35,9 +35,15 @@
   </template>
 </div>
 <table id="bb-elements">
+<template>
+  <tr id="{{selection.bb}}.0">
+    <td class="{{selection.bb}}">{{selection.bb}}.0</td>
+    <td>(initial state)</td>
+  </tr>
+</template>
 <template data-for="elt in cfg[selection.bb].elements">
-  <tr id="{{selection.bb}}.{{elt_index}}">
-    <td class="{{selection.bb}}">{{selection.bb}}.{{elt_index}}</td>
+  <tr id="{{selection.bb}}.{{elt_index+1}}">
+    <td class="{{selection.bb}}">{{selection.bb}}.{{elt_index+1}}</td>
     <td>{{elt}}</td>
   </tr>
 </template>


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D148951.516394.patch
Type: text/x-patch
Size: 785 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230424/76944416/attachment-0001.bin>


More information about the cfe-commits mailing list