<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Jul 27, 2011, at 11:49 AM, jahanian wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Jul 27, 2011, at 11:41 AM, Douglas Gregor wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><br>On Jul 26, 2011, at 10:58 AM, Fariborz Jahanian wrote:<br><br><blockquote type="cite">Author: fjahanian<br></blockquote><blockquote type="cite">Date: Tue Jul 26 12:58:54 2011<br></blockquote><blockquote type="cite">New Revision: 136103<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">URL: <a href="http://llvm.org/viewvc/llvm-project?rev=136103&view=rev">http://llvm.org/viewvc/llvm-project?rev=136103&view=rev</a><br></blockquote><blockquote type="cite">Log:<br></blockquote><blockquote type="cite">Provide fixit for static use of objective-c type<br></blockquote><blockquote type="cite">in few more places and in each instance, fix up<br></blockquote><blockquote type="cite">the type to the expected type. // <a href="rdar://9603056">rdar://9603056</a><br></blockquote><br>One comment about the test below.<br><br><blockquote type="cite">Modified: cfe/trunk/test/FixIt/fixit-static-object-decl.m<br></blockquote><blockquote type="cite">URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/FixIt/fixit-static-object-decl.m?rev=136103&r1=136102&r2=136103&view=diff">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/FixIt/fixit-static-object-decl.m?rev=136103&r1=136102&r2=136103&view=diff</a><br></blockquote><blockquote type="cite">==============================================================================<br></blockquote><blockquote type="cite">--- cfe/trunk/test/FixIt/fixit-static-object-decl.m (original)<br></blockquote><blockquote type="cite">+++ cfe/trunk/test/FixIt/fixit-static-object-decl.m Tue Jul 26 12:58:54 2011<br></blockquote><blockquote type="cite">@@ -9,10 +9,21 @@<br></blockquote><blockquote type="cite">// RUN: %clang_cc1 -fsyntax-only -Werror -x objective-c++ %t<br></blockquote><blockquote type="cite">// <a href="rdar://9603056">rdar://9603056</a><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">+@interface S @end<br></blockquote><blockquote type="cite">+<br></blockquote><blockquote type="cite">@interface NSArray<br></blockquote><blockquote type="cite">+{<br></blockquote><blockquote type="cite">+@public<br></blockquote><blockquote type="cite">+  S iS;<br></blockquote><blockquote type="cite">+}<br></blockquote><blockquote type="cite">+ (id) arrayWithObjects;<br></blockquote><blockquote type="cite">@end<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">+NSArray func() {<br></blockquote><blockquote type="cite">+  NSArray P;<br></blockquote><blockquote type="cite">+  return P;<br></blockquote><blockquote type="cite">+}<br></blockquote><blockquote type="cite">+<br></blockquote><blockquote type="cite">int main() {<br></blockquote><blockquote type="cite">  <span class="Apple-tab-span" style="white-space:pre">  </span>NSArray pluginNames = [NSArray arrayWithObjects];<br></blockquote><blockquote type="cite">}<br></blockquote><br>Some of the other tests in test/FixIt actually use the -fixit mode to write out a modified source file, and then verify that the source file parses without any errors. It's a great way to ensure that the location information in the fix is accurate.<br></div></blockquote><div><br></div>Yes. Here is the command in the same test file.</div><div><br></div><div><span class="Apple-style-span" style="font-family: monospace; white-space: pre; "><pre>// Objective-C recovery
// RUN: cp <i><font color="#B22222">%s %t
</font></i>// RUN: <i><font color="#B22222">%clang_cc1 -fixit -x objective-c %t || true
</font></i>// RUN: <i><font color="#B22222">%clang_cc1 -fsyntax-only -Werror -x objective-c %t
</font></i>
// Objective-C++ recovery
// RUN: cp <i><font color="#B22222">%s %t
</font></i>// RUN: <i><font color="#B22222">%clang_cc1 -fixit -x objective-c++ %t || true
</font></i>// RUN: <i><font color="#B22222">%clang_cc1 -fsyntax-only -Werror -x objective-c++ %t
</font></i>// <a href="rdar://960305">rdar://9603056</a>
</pre></span></div></div></blockquote><br></div><div>Great, thanks!</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">      </span>- Doug</div><br></body></html>