[clang] [clang][dataflow] Various formatting tweaks to HTMLLogger. (PR #68392)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 6 00:27:14 PDT 2023
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang-analysis
<details>
<summary>Changes</summary>
* Ensure timeline entries don't have linebreaks by setting
`min-width: max-content`.
* Give the timeline header some padding on the right so it doesn't run into the
"Function" header.
* Put some padding around the iteration choosers so they don't run into each
other.
* Eliminate the "Iteration" text from the iteration choosers, which took up a
lot of space. It should be clear what these are without the "Iteration"
text. (This makes the above problem of iteration choosers running into each
other less likely, but also add the padding nonetheless.)
---
Full diff: https://github.com/llvm/llvm-project/pull/68392.diff
2 Files Affected:
- (modified) clang/lib/Analysis/FlowSensitive/HTMLLogger.css (+6-1)
- (modified) clang/lib/Analysis/FlowSensitive/HTMLLogger.html (+1-1)
``````````diff
diff --git a/clang/lib/Analysis/FlowSensitive/HTMLLogger.css b/clang/lib/Analysis/FlowSensitive/HTMLLogger.css
index 4de1d1ccc2b08ee..5da8db8fa87bf2f 100644
--- a/clang/lib/Analysis/FlowSensitive/HTMLLogger.css
+++ b/clang/lib/Analysis/FlowSensitive/HTMLLogger.css
@@ -19,6 +19,7 @@ section header {
color: white;
font-weight: bold;
font-size: large;
+ padding-right: 0.5em;
}
section h2 {
font-size: medium;
@@ -27,7 +28,7 @@ section h2 {
border-top: 1px solid #aaa;
}
#timeline {
- min-width: 0;
+ min-width: max-content;
}
#timeline .entry.hover {
background-color: #aaa;
@@ -62,6 +63,10 @@ section h2 {
#iterations .chooser {
flex-grow: 1;
text-align: center;
+ padding-left: 0.2em;
+}
+#iterations .chooser :last-child {
+ padding-right: 0.2em;
}
#iterations .chooser:not(.iter-select).hover {
background-color: #ddd;
diff --git a/clang/lib/Analysis/FlowSensitive/HTMLLogger.html b/clang/lib/Analysis/FlowSensitive/HTMLLogger.html
index ec9d74c71d35d98..b9f76c5074c7539 100644
--- a/clang/lib/Analysis/FlowSensitive/HTMLLogger.html
+++ b/clang/lib/Analysis/FlowSensitive/HTMLLogger.html
@@ -62,7 +62,7 @@
<template data-for="iter in cfg[selection.bb].iters">
<a class="chooser {{selection.bb}}:{{iter.iter}}" data-iter="{{selection.bb}}:{{iter.iter}}">
<template data-if="iter.post_visit">Post-visit</template>
- <template data-if="!iter.post_visit">Iteration {{iter.iter}}</template>
+ <template data-if="!iter.post_visit">{{iter.iter}}</template>
<template data-if="iter.converged"> →|<!--Rightwards arrow, vertical line--></template>
</a>
</template>
``````````
</details>
https://github.com/llvm/llvm-project/pull/68392
More information about the cfe-commits
mailing list