<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Nov 17, 2009, at 9:22 AM, Fariborz Jahanian wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><br>On Nov 16, 2009, at 8:25 PM, Douglas Gregor wrote:<br><br><blockquote type="cite"><br></blockquote><blockquote type="cite">On Nov 16, 2009, at 10:57 AM, Fariborz Jahanian wrote:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><blockquote type="cite">Author: fjahanian<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Date: Mon Nov 16 12:57:01 2009<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">New Revision: 88934<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">URL: <a href="http://llvm.org/viewvc/llvm-project?rev=88934&view=rev">http://llvm.org/viewvc/llvm-project?rev=88934&view=rev</a><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Log:<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Handle case of missing '@end' in implementation context<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">gracefully, on par with gcc, by: Issuing a warning,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">doing final sematinc check of its definitions and generating<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">its meta-data.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" color="#006312"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">======================================================================<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">--- cfe/trunk/lib/Sema/SemaDeclObjC.cpp (original)<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">+++ cfe/trunk/lib/Sema/SemaDeclObjC.cpp Mon Nov 16 12:57:01 2009<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">@@ -1559,12 +1559,17 @@<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> // should be true.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> if (!ClassDecl)<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">   return;<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">-<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">+<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> bool isInterfaceDeclKind =<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">       isa<ObjCInterfaceDecl>(ClassDecl) || isa<ObjCCategoryDecl>(ClassDecl)<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">        || isa<ObjCProtocolDecl>(ClassDecl);<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> bool checkIdenticalMethods = isa<ObjCImplementationDecl>(ClassDecl);<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">+  if (!isInterfaceDeclKind && AtEndLoc.isInvalid()) {<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">+    AtEndLoc = ClassDecl->getLocation();<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">+    Diag(AtEndLoc, diag::warn_missing_atend);<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">+  }<br></blockquote></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Is there any way for us to guess where the @end should go, with high probability? If so, we should add a fix-it.<br></blockquote>This could be tricky. Just about anything can be embedded in an @implementation; including c-style declarations. @end with<br>certainty should come before objective-c directives; such as @protocol, @interface, another @implementation and eof.<br>We can add a fix-it based on these four tokens. But I am not sure how high the probability of a correct fix-it would be.<br>If you think it is high enough, I will investigate.<br></div></blockquote></div><br><div>It does not sound like the probability of getting it right is high enough; it isn't worth spending time on.</div><div><br></div><div>Thanks, Fariborz!</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">    </span>- Doug</div></body></html>