Anna,<div><br></div><div>Thanks for the feedback. I think I have a better idea of how to go about it now. I'll have another shot at it.</div><div><br></div><div>Adam<br><br><div class="gmail_quote">On Mon, Apr 22, 2013 at 1:17 PM, Anna Zaks <span dir="ltr"><<a href="mailto:ganna@apple.com" target="_blank">ganna@apple.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Adam,<div><br></div><div><div><div>The warning looks good for the listed test cases (though the column seems redundant). However, it might not be a good fit when the file name is not a string literal. In other checkers, we often pretty print the region instead; for example, see reportLeak in the MallocChecker. </div>

<div><br></div><div>The second issue is storing the string in the state. It should be possible to get the file info only at the point of a leak report, not when processing 'fopen'. Specifically, you would go up the path when reporting the leak and find the statement that opened the file. That logic would be very similar to "<span style="color:rgb(49,89,93);font-family:Menlo">getAllocationSite"</span> from mallocChecker. Let's see if we can factor it out so that we do not continue with copying and pasting of that code.</div>

<div><br></div><div>Thanks!</div><span class="HOEnZb"><font color="#888888"><div>Anna.</div></font></span><div><div class="h5"><div>On Apr 21, 2013, at 10:56 PM, Adam Schnitzer <<a href="mailto:adamschn@umich.edu" target="_blank">adamschn@umich.edu</a>> wrote:</div>

<br><blockquote type="cite"><div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">Anna, <div><br></div><div>Got it, sorry about the mixup. I will go ahead and work in a separate file. But did it look like I was on the right track for the diagnostics?<div>

<br></div><div>Adam<br><br><div class="gmail_quote">On Mon, Apr 22, 2013 at 1:20 AM, Anna Zaks<span> </span><span dir="ltr"><<a href="mailto:ganna@apple.com" target="_blank">ganna@apple.com</a>></span><span> </span>wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Adam,<br><br>Sorry if I was not 100% clear. We'd like to leave the SimpleStreamChecker.cpp file as is for reference purposes. You can either create a new file or replace StreamChecker.cpp with your checker.<br>

<br>Thanks,<br>Anna.<br><div><div>On Apr 20, 2013, at 11:34 PM, Adam Schnitzer <<a href="mailto:adamschn@umich.edu" target="_blank">adamschn@umich.edu</a>> wrote:<br><br>> This is my first patch for the SimpleStreamChecker. It improves diagnostics by adding the file name in the case of a resource leak. I did so by adding a std::string to the StreamState to hold the file name.<br>

><br>> Any feedback would be great.<br>><br>> Adam<br></div></div>> <SimpleStreamChecker.patch></blockquote></div></div></div></div></blockquote></div></div></div><br></div></div></blockquote></div><br>

</div>