[PATCH] D73993: [analyzer] Fix a couple of bugs in HTML report generation.

Artem Dergachev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 4 13:28:16 PST 2020


NoQ created this revision.
NoQ added reviewers: dcoughlin, xazax.hun, Charusso.
Herald added subscribers: cfe-commits, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, rnkovacs, szepet, baloghadamsoftware.
Herald added a project: clang.

This patch fixes an accidental redundant `</td>` and disables generation of variable popups within macro popups due to https://bugs.llvm.org/show_bug.cgi?id=44782

I also added some tests for our HTML files because those were pretty much non-existent so far. Given that we can now also test scan-build (i actually landed D69781 <https://reviews.llvm.org/D69781> yesterday), there are no more excuses for not writing tests. Test `variable-popups.c` was passing previously, so it's here just for the sake of finally having a test, while the other two tests were failing on their respective `CHECK-NOT` directives.

Another interesting thing i did was apply `tidy-html5` to our HTML files. They seem to satisfy the linter now, and btw that's how i found the first issue (while trying to reduce the second issue by running `tidy-html5` under `creduce`).

@Charusso: I didn't manage to understand how `PopUpRanges` get passed around and why, so i removed them. If you have an example of where it matters, please send tests :)


Repository:
  rC Clang

https://reviews.llvm.org/D73993

Files:
  clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp
  clang/test/Analysis/html_diagnostics/td-hotfix.c
  clang/test/Analysis/html_diagnostics/variable-popups-2.c
  clang/test/Analysis/html_diagnostics/variable-popups.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73993.242414.patch
Type: text/x-patch
Size: 10428 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200204/9ee2b3fa/attachment.bin>


More information about the cfe-commits mailing list