<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Nov 10, 2014 at 6:52 AM, Vassil Vassilev <span dir="ltr"><<a href="mailto:vasil.georgiev.vasilev@cern.ch" target="_blank">vasil.georgiev.vasilev@cern.ch</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">It seems to me not a bad idea: if we are planning to provide better diagnostics of 'ill-formed' modulemaps. We could use FileCheck but I thought -verify was invented for such cases.</blockquote><div><br></div><div>I agree. We currently have essentially zero test coverage for our handling of ill-formed module map files.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="HOEnZb"><font color="#888888"><br>
Vassil</font></span><div class="HOEnZb"><div class="h5"><br>
On 11/07/2014 01:09 AM, Jordan Rose wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Is it really worth putting effort into -verify for this? I'd be okay with just using FileCheck:<br>
<br>
// CHECK: {{Inputs[/\\]declare-use[/\\]<u></u>module.map}}:30:10: note: header file...<br>
<br>
Jordan<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Nov 3, 2014, at 2:10 , Vassil Vassilev <<a href="mailto:vvasilev@cern.ch" target="_blank">vvasilev@cern.ch</a>> wrote:<br>
<br>
Hi guys,<br>
I am working on <a href="http://llvm.org/bugs/show_bug.cgi?id=20507" target="_blank">http://llvm.org/bugs/show_bug.<u></u>cgi?id=20507</a> Now the diagnostic gets issued for:<br>
Clang :: Modules/declare-use1.cpp<br>
Clang :: Modules/declare-use2.cpp<br>
Clang :: Modules/declare-use3.cpp<br>
Clang :: Modules/strict-decluse.cpp<br>
<br>
It says smth like: Modules/Inputs/declare-use/<u></u>module.map:30:10: note: Header file 'unavailable.h' not present in module 'XF'<br>
<br>
I'd like to add an expected diag to the modulemap file. Eg:<br>
module XF {<br>
...<br>
header "unavailable.h" // expected-note {{...}}<br>
...<br>
}<br>
<br>
Is that the right way to go?<br>
<br>
If yes, VerifyDiagnosticConsumer requires some callbacks (such as HandleComment) which come from the Preprocessor. In the ModuleMapParser we use raw lexing (without PP at all) and I was wondering what would be the right way to go, in order to make the -verify flag work inside the module maps. One solution that I see is to pass the comment handlers from the PP to the ModuleMapParser, however IMO this would break the encapsulation. Do you have better ideas?<br>
<br>
Many thanks,<br>
Vassil<br>
______________________________<u></u>_________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu" target="_blank">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/<u></u>mailman/listinfo/cfe-commits</a><br>
</blockquote></blockquote>
<br>
</div></div></blockquote></div><br></div></div>