<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
</head>
<body text="#000000" bgcolor="#FFFFFF">
I'm confused.<br>
<br>
This assertion applies only to path-insensitive reports into which
you supply the PathDiagnosticLocation manually. For such reports you
can check the location for validity before you put it into the
report.<br>
<br>
For path-sensitive reports the location is computed dynamically
based on the error node's ProgramPoint and it's not immediately
checked for validity. In the old code (before
<a class="moz-txt-link-freetext" href="https://reviews.llvm.org/D66572">https://reviews.llvm.org/D66572</a>) the stored location was asserted to
be *in*valid because the information was already present in the
error node; after said patch path sensitive reports don't store the
location at all.<br>
<br>
One of the reasons why a path-sensitive report may have invalid path
diagnostic location is that the underlying source location may be
invalid, eg. comes from a BodyFarm.<br>
<br>
<div class="moz-cite-prefix">On 9/30/19 6:25 AM, Ádám Balogh via
cfe-dev wrote:<br>
</div>
<blockquote type="cite"
cite="mid:AM0PR07MB4049A6908EC8BAD3C839DF1B81820@AM0PR07MB4049.eurprd07.prod.outlook.com">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal">Hello,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">We have a checker that we plan to open
source, but it crashes upon a strange assertion. We create a
non-fatal `BugReport` which we try to emit. Before emitting
the code tries to check whether its location is valid using
`getLocation(…).isValid()`, to prevent assertion in `emit()`,
however `getLocation()` itself already asserts that the
location is valid. This makes the `isValid()` function useless
because we cannot get the location to check whether its is
valid because it crashes with assertion if it is not. Of
course the location should be valid in a non-fatal error node
(probably this is the root problem), but there is no way to
check it. What is the reason for this assertion in
`getLocation()`? How to check its validity? What can make the
location of a non-fatal `BugReport` invalid? Thanks for the
answers in advance!<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Regards,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span lang="HU">Ádám<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
cfe-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a>
<a class="moz-txt-link-freetext" href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a>
</pre>
</blockquote>
<br>
</body>
</html>