<div dir="ltr"><font face="arial, sans-serif">We can use this for testing warnings in our builtin headers from clang/lib/Headers.  Sometimes I've written tests against those that issue notes in the system header, and it's impossible to match against them in a non-brittle way.</font><div>
<font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">Patch looks good.  I agree, there's no way to combine this bit with the DiagnosticLoc SourceLocation, so an extra flag is necessary.</font></div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jul 9, 2014 at 2:05 AM, Andy Gibbs <span dir="ltr"><<a href="mailto:andyg1001@hotmail.co.uk" target="_blank">andyg1001@hotmail.co.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On Tuesday, July 08, 2014 6:54 PM, David Blaikie wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Oh, that's fair. It'd be good to provide a comment in the test case<br>
explaining this (the external use case), since I could imagine someone<br>
coming back and thinking this is a bit silly to have for writing<br>
internal test cases. (& hopefully we'll avoid proliferation of this<br>
feature in internal test cases just by code review)<br>
<br>
One thought on the code/design: would it be reasonable to, rather than<br>
having the "MatchAllLines" flag, use an invalid ExpectedLoc? You might<br>
still need a small-scoped "MatchAllLines" (I'd perhaps rename it to<br>
"MatchAnyLine"?) due to the invalid ExpectedLoc used to determine<br>
whether to report err_verify_missing_line, but after that you could<br>
probably set ExpectedLoc to invalid and use that?<br>
</blockquote>
<br></div>
We cannot use an invalid ExpectedLoc since we must also match the file<br>
name when checking the diagnostic lists, however I have implemented your<br>
requests in the attached patch.  With your approval, I will commit it.<div class=""><br>
<br>
<br>
On Tuesday, July 08, 2014 6:10 PM, Jordan Rose wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The analyzer would get mild use out of this too; we have "system header<br>
simulators" shared across multiple files, and encoding line numbers in<br>
each file that uses the header is somewhat brittle when the header<br>
needs to change. Although I just realized that #line might be able to<br>
get around that...<br>
</blockquote>
<br></div>
#line is probably ok where a header file is simple, and indeed for<br>
internal test-cases this could be ideal if you are trying to pin down<br>
a diagnostic to a particular line of code.  I would beware of creating<br>
complications if more than one line ended up with the same line number!<br>
<br>
<br>
Cheers<span class="HOEnZb"><font color="#888888"><br>
Andy<br>
<br>
</font></span><br>_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
<br></blockquote></div><br></div>