<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p
{mso-style-priority:99;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
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]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Thanks Nico and Richard. I’m working on fixing it.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">-John<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Richard Smith [mailto:metafoo@gmail.com]
<br>
<b>Sent:</b> Wednesday, January 08, 2014 1:02 PM<br>
<b>To:</b> Nico Weber; Thompson, John; cfe-dev@cs.uiuc.edu<br>
<b>Subject:</b> Re: [cfe-dev] help with modules<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">This is a known bug.<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">The problem is that when we go to build the module in "Inputs/UndefinedFixIt1", we build some synthetic #includes for the contents of the module (relative to the current directory), then change into the "Inputs/UndefinedFixIt1" directory
to perform the build of the module, where the includes we synthesized obviously don't work. The workaround is to use absolute -I paths for any directory containing a module.<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Patches to fix this would be welcome! =)<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On Wed Jan 08 2014 at 10:01:00 AM, Nico Weber <<a href="mailto:thakis@chromium.org">thakis@chromium.org</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<p class="MsoNormal">It seems to work for me if I pass an absolute path to -I – does that help?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><o:p> </o:p></p>
</div>
<div>
<div>
<p class="MsoNormal">On Wed, Jan 8, 2014 at 8:18 AM, Thompson, John <<a href="mailto:John_Thompson@playstation.sony.com" target="_blank">John_Thompson@playstation.sony.com</a>> wrote:<o:p></o:p></p>
</div>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<div>
<div>
<p>Hi,<o:p></o:p></p>
<p> <o:p></o:p></p>
<p>Could someone help me understand what is wrong with the enclosed build module example? (It’s kind of in the form of a test, but ignore the comment for running the test, as it’s just a source file here.)<o:p></o:p></p>
<p> <o:p></o:p></p>
<p>I’m trying to gear up to add a fixit message for undefined types which can be found in a module, but I can’t get this simple scenario to work. The idea is that if I later remove the #include, I’ll get an error on the undefined type, which nonetheless could
be found in a module, allowing me to add a fixit.<o:p></o:p></p>
<p> <o:p></o:p></p>
<p>In looking at other modules tests, it seems that if I put the module.map file in a subdirectory and use a -I option, clang can find the module map there and load it, right?<o:p></o:p></p>
<p> <o:p></o:p></p>
<p>In looking at this in a debugger, in the HandleIncludeDirective function, the lookupFile call at line 1452 loads the module map. But then at line 1655 a loadModule call loads the module map again, but fails.<o:p></o:p></p>
<p> <o:p></o:p></p>
<p>To reproduce, just run the makefile, which produces:<o:p></o:p></p>
<p> <o:p></o:p></p>
<p>***<o:p></o:p></p>
<p>d:\Clang\bugs\modules>make<o:p></o:p></p>
<p>clang -cc1 -fmodules-cache-path=TestOutput -fmodules -IInputs\UndefinedFixIt1 UndefinedFixIt1.cpp<o:p></o:p></p>
<p><module-includes>:1:10: fatal error: 'Inputs\UndefinedFixIt1\public1.h' file not found<o:p></o:p></p>
<p>#include "Inputs\UndefinedFixIt1\public1.h"<o:p></o:p></p>
<p> ^<o:p></o:p></p>
<p>UndefinedFixIt1.cpp:4:10: fatal error: could not build module 'public1'<o:p></o:p></p>
<p>#include "public1.h"<o:p></o:p></p>
<p>~~~~~~~~^~~~~~~~~~~<o:p></o:p></p>
<p>2 errors generated.<o:p></o:p></p>
<p>make: *** [all] Error 1<o:p></o:p></p>
<p>***<o:p></o:p></p>
<p> <o:p></o:p></p>
<p>It’s probably something simple, but I can’t see it.<o:p></o:p></p>
<p> <o:p></o:p></p>
<p>Thanks.<o:p></o:p></p>
<p><span style="color:#888888"> <o:p></o:p></span></p>
<p><span style="color:#888888">-John<o:p></o:p></span></p>
<p><span style="color:#888888"> <o:p></o:p></span></p>
<p><span style="color:#888888"> <o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</blockquote>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><o:p></o:p></p>
</div>
</div>
</blockquote>
<p class="MsoNormal"><o:p> </o:p></p>
</blockquote>
</div>
</body>
</html>