[PATCH] D65663: [analyzer] ConditionBRVisitor: Fix HTML PathDiagnosticPopUpPieces
Csaba Dabis via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 2 09:57:12 PDT 2019
Charusso created this revision.
Charusso added a reviewer: NoQ.
Charusso added a project: clang.
Herald added subscribers: cfe-commits, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun.
Charusso added a comment.
It also reverts https://reviews.llvm.org/rL362632 which is not a fix, but a problem instead.
A condition could be a multi-line expression where we create the highlight
in separated chunks. PathDiagnosticPopUpPiece is not made for that purpose,
it cannot be added to multiple lines because we have only one ending part
which contains all the notes. So that it cannot have multiple endings and
therefore this patch narrows down the ranges of the highlight to the given
interesting variable of the condition. It prevents HTML-breaking injections.
Repository:
rC Clang
https://reviews.llvm.org/D65663
Files:
clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp
clang/test/Analysis/Inputs/expected-plists/cxx-for-range.cpp.plist
clang/test/Analysis/Inputs/expected-plists/edges-new.mm.plist
clang/test/Analysis/Inputs/expected-plists/inline-plist.c.plist
clang/test/Analysis/Inputs/expected-plists/objc-radar17039661.m.plist
clang/test/Analysis/Inputs/expected-plists/plist-output.m.plist
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65663.213063.patch
Type: text/x-patch
Size: 22398 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190802/061febef/attachment-0001.bin>
More information about the cfe-commits
mailing list