[PATCH] D37187: [Analyzer] Fix Bug 25609 - Assertion UNREACHABLE: 'Unexpected ProgramPoint' with widen-loops=true

Wang Liushuai via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 31 10:13:15 PDT 2017


MTC marked an inline comment as done.
MTC added inline comments.


================
Comment at: lib/StaticAnalyzer/Core/PathDiagnostic.cpp:694
+  } else if (Optional<BlockEntrance> BE = P.getAs<BlockEntrance>()) {
+    CFGElement BlockFront = BE->getBlock()->front();
+    if (BlockFront.getKind() == CFGElement::Statement) {
----------------
szepet wrote:
> I think it would be more correct to use the location what is used in case of the BlockEdge. (So on the entranced block terminator condition.) The reason is because the BlockEntrance display message will be displayed before the message of the BlockEdge (since it is an "earlier" node in the ExplodedGraph). So it would result that if check these notes in a viewer then the earlier note would belong to the later location which could be confusing.
Yes, it would be better to use the location of the TerminatorCondition :D.


https://reviews.llvm.org/D37187





More information about the cfe-commits mailing list