<div dir="ltr">Test?</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jul 23, 2014 at 12:48 PM, David Majnemer <span dir="ltr"><<a href="mailto:david.majnemer@gmail.com" target="_blank">david.majnemer@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi rsmith,<br>
<br>
Parser::ParseDeclarationSpecifiers eagerly updates the source range of<br>
the DeclSpec with the current token position.  However, it might not<br>
consume any more tokens.<br>
<br>
Fix this by only setting the start of the range, not the end.  This way<br>
the SourceRange will be invalid if we don't consume any more tokens.<br>
<br>
This fixes PR20413.<br>
<br>
<a href="http://reviews.llvm.org/D4646" target="_blank">http://reviews.llvm.org/D4646</a><br>
<br>
Files:<br>
  lib/Parse/ParseDecl.cpp<br>
<br>
Index: lib/Parse/ParseDecl.cpp<br>
===================================================================<br>
--- lib/Parse/ParseDecl.cpp<br>
+++ lib/Parse/ParseDecl.cpp<br>
@@ -2450,7 +2450,7 @@<br>
                                         LateParsedAttrList *LateAttrs) {<br>
   if (DS.getSourceRange().isInvalid()) {<br>
     DS.SetRangeStart(Tok.getLocation());<br>
-    DS.SetRangeEnd(Tok.getLocation());<br>
+    DS.SetRangeEnd(SourceLocation());<br>
   }<br>
<br>
   bool EnteringContext = (DSContext == DSC_class || DSContext == DSC_top_level);<br>
<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>