<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, May 22, 2017 at 3:17 PM, Richard Smith <span dir="ltr"><<a href="mailto:richard@metafoo.co.uk" target="_blank">richard@metafoo.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><div class="gmail-h5"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">   // If the StrTok is "eod", then it wasn't present.  Otherwise, it must be a<br>
   // string followed by eod.<br>
-  if (StrTok.is(tok::eod))<br>
-    ; // ok<br>
-  else if (StrTok.isNot(tok::string_lite<wbr>ral)) {<br>
+  if (StrTok.is(tok::eod)) {<br>
+    // Treat this like "#line NN", which doesn't change file characteristics.<br>
+    FileKind = SourceMgr.getFileCharacteristi<wbr>c(DigitTok.getLocation());<br></blockquote><div><br></div></div></div><div>This change for "# <number>" handling makes sense (and I've checked and it matches GCC), but it looks like we don't have test coverage for either the old or new behavior. Can I interest you in adding some? :)</div></div></div></div></blockquote><div><br></div><div>We do have coverage for it, see test/Preprocessor/line-directive.c:</div><div>"""</div><div><div># 192 "glomp.h" 3 // System header.</div><div>typedef int y;  // ok</div><div>typedef int y;  // ok</div><div><br></div><div>typedef int q;  // q is in system header.</div><div><br></div><div>#line 42 "blonk.h"  // doesn't change system headerness.</div><div><br></div><div>typedef int z;  // ok</div><div>typedef int z;  // ok</div><div><br></div><div># 97     // doesn't change system headerness.</div><div><div><br></div><div>typedef int z1;  // ok</div><div>typedef int z1;  // ok</div></div><div>"""</div></div><div><br></div><div>We were just getting similar behavior because of the code I removed that sends us to the #line directive handling when the filename isn't present.</div></div></div></div>