<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Static Code Analysis (Clang) and Xcode 3.2</title>
	<atom:link href="http://MobileDeveloperTips.com/xcode/static-code-analysis-clang-and-xcode-3-2.html/feed" rel="self" type="application/rss+xml" />
	<link>http://MobileDeveloperTips.com/xcode/static-code-analysis-clang-and-xcode-3-2.html</link>
	<description>iOS and Objective-C Tips, Tricks and Tutorials.</description>
	<lastBuildDate>Tue, 22 May 2012 11:53:47 -0500</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: nah</title>
		<link>http://MobileDeveloperTips.com/xcode/static-code-analysis-clang-and-xcode-3-2.html#comment-36498</link>
		<dc:creator>nah</dc:creator>
		<pubDate>Mon, 03 Jan 2011 10:46:42 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=3698#comment-36498</guid>
		<description>it&#039;s no typo - it&#039;s camel case ;)</description>
		<content:encoded><![CDATA[<p>it&#8217;s no typo &#8211; it&#8217;s camel case ;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ken</title>
		<link>http://MobileDeveloperTips.com/xcode/static-code-analysis-clang-and-xcode-3-2.html#comment-32493</link>
		<dc:creator>Ken</dc:creator>
		<pubDate>Sun, 21 Nov 2010 19:41:36 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=3698#comment-32493</guid>
		<description>Thank You Chris!!!</description>
		<content:encoded><![CDATA[<p>Thank You Chris!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://MobileDeveloperTips.com/xcode/static-code-analysis-clang-and-xcode-3-2.html#comment-29519</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Thu, 28 Oct 2010 16:36:38 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=3698#comment-29519</guid>
		<description>For anyone having problems getting Build and Analyze to work correctly in XCode, try setting it build for Device rather than Simulator. Apparently there&#039;s a bug for versions of XCode &gt; 3.2.3 meaning that this only works for Device.

You don&#039;t need a device connected, just make sure the drop down says Device.</description>
		<content:encoded><![CDATA[<p>For anyone having problems getting Build and Analyze to work correctly in XCode, try setting it build for Device rather than Simulator. Apparently there&#8217;s a bug for versions of XCode &gt; 3.2.3 meaning that this only works for Device.</p>
<p>You don&#8217;t need a device connected, just make sure the drop down says Device.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Patrick Alessi</title>
		<link>http://MobileDeveloperTips.com/xcode/static-code-analysis-clang-and-xcode-3-2.html#comment-20908</link>
		<dc:creator>Patrick Alessi</dc:creator>
		<pubDate>Thu, 22 Jul 2010 23:44:26 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=3698#comment-20908</guid>
		<description>It&#039;s a shame, CLANG can&#039;t find the memory leak in this code:

    NSMutableString *theString = [[NSMutableString alloc] init];
    
    for (int i=0; i&lt;100; i++)
    {
        [theString appendFormat:@&quot;%d &quot;,i] ;
    }
    
    NSLog(@&quot;theString is: %@&quot;, theString);


Not really sure why. I never release theString.  This is caught easily by the Instruments Leaks tool, but CLANG doesn&#039;t catch it.</description>
		<content:encoded><![CDATA[<p>It&#8217;s a shame, CLANG can&#8217;t find the memory leak in this code:</p>
<p>    NSMutableString *theString = [[NSMutableString alloc] init];</p>
<p>    for (int i=0; i&lt;100; i++)<br />
    {<br />
        [theString appendFormat:@&quot;%d &quot;,i] ;<br />
    }</p>
<p>    NSLog(@&quot;theString is: %@&quot;, theString);</p>
<p>Not really sure why. I never release theString.  This is caught easily by the Instruments Leaks tool, but CLANG doesn&#039;t catch it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Payne</title>
		<link>http://MobileDeveloperTips.com/xcode/static-code-analysis-clang-and-xcode-3-2.html#comment-14757</link>
		<dc:creator>Robert Payne</dc:creator>
		<pubDate>Thu, 06 May 2010 07:36:06 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=3698#comment-14757</guid>
		<description>Great Article... I simply cannot believe I didn&#039;t know about this before it&#039;s insanely faster than GCC.</description>
		<content:encoded><![CDATA[<p>Great Article&#8230; I simply cannot believe I didn&#8217;t know about this before it&#8217;s insanely faster than GCC.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erik</title>
		<link>http://MobileDeveloperTips.com/xcode/static-code-analysis-clang-and-xcode-3-2.html#comment-13325</link>
		<dc:creator>Erik</dc:creator>
		<pubDate>Thu, 15 Apr 2010 19:32:14 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=3698#comment-13325</guid>
		<description>I have written a simple code to check xcode static analyzer.

char b[15];
	
 char a[50]=&quot;aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&quot;;
   strcpy(b,a);

Surprisingly the xcode unable to detect simple buffer overflow issue. I tried with GCC 4.2, LLVM GCC 4.2 and clang LLVM 1.0. No issue detected. Is these any bench mark available for xcode analysis. How much effective is this?</description>
		<content:encoded><![CDATA[<p>I have written a simple code to check xcode static analyzer.</p>
<p>char b[15];</p>
<p> char a[50]=&#8221;aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&#8221;;<br />
   strcpy(b,a);</p>
<p>Surprisingly the xcode unable to detect simple buffer overflow issue. I tried with GCC 4.2, LLVM GCC 4.2 and clang LLVM 1.0. No issue detected. Is these any bench mark available for xcode analysis. How much effective is this?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Casey</title>
		<link>http://MobileDeveloperTips.com/xcode/static-code-analysis-clang-and-xcode-3-2.html#comment-9400</link>
		<dc:creator>Casey</dc:creator>
		<pubDate>Sat, 06 Feb 2010 05:56:59 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=3698#comment-9400</guid>
		<description>Hi John,

Thanks for the tip!  I suspected that Clean had that effect, but I&#039;m glad to hear it confirmed.  Unfortunately, after running Clean I no longer get any static analysis results in the Build Results window when I think I should (ex: synthesized properties not released in dealloc).  I made sure that &quot;Run Static Analyzer&quot; is enabled in the Project Settings, and this seems to happen regardless of which compiler version I&#039;m using.  I&#039;m not sure how I could have broken it, but you never know.  Thoughts?  I hope I can get this working; the more insight I have into my code, the better.

Cheers.</description>
		<content:encoded><![CDATA[<p>Hi John,</p>
<p>Thanks for the tip!  I suspected that Clean had that effect, but I&#8217;m glad to hear it confirmed.  Unfortunately, after running Clean I no longer get any static analysis results in the Build Results window when I think I should (ex: synthesized properties not released in dealloc).  I made sure that &#8220;Run Static Analyzer&#8221; is enabled in the Project Settings, and this seems to happen regardless of which compiler version I&#8217;m using.  I&#8217;m not sure how I could have broken it, but you never know.  Thoughts?  I hope I can get this working; the more insight I have into my code, the better.</p>
<p>Cheers.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Muchow</title>
		<link>http://MobileDeveloperTips.com/xcode/static-code-analysis-clang-and-xcode-3-2.html#comment-9397</link>
		<dc:creator>John Muchow</dc:creator>
		<pubDate>Sat, 06 Feb 2010 02:59:27 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=3698#comment-9397</guid>
		<description>Casey, you may already know this, however....you can touch all the files in a project by choosing the option &#039;Clean&#039; in the &#039;Build&#039; menu. I do this often, clean and rebuild.

Anyone else have any insight on Clang LVM ??

John</description>
		<content:encoded><![CDATA[<p>Casey, you may already know this, however&#8230;.you can touch all the files in a project by choosing the option &#8216;Clean&#8217; in the &#8216;Build&#8217; menu. I do this often, clean and rebuild.</p>
<p>Anyone else have any insight on Clang LVM ??</p>
<p>John</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Casey</title>
		<link>http://MobileDeveloperTips.com/xcode/static-code-analysis-clang-and-xcode-3-2.html#comment-9390</link>
		<dc:creator>Casey</dc:creator>
		<pubDate>Fri, 05 Feb 2010 21:45:12 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=3698#comment-9390</guid>
		<description>Hi John,

Thanks for the article.  Clang appears to be a great tool and I would love to add it to my kit, but I&#039;ve run into a few problems:

When I try to set the C/C++ Compiler Version in my Project Settings to Clang LLVM 1.0, I get the error &quot;Library not found for -lgcc&quot; when I attempt to build in Xcode.  When I use the system default compiler (GCC 4.2), I can get static analysis to work on a per-file basis when I Build &amp; Analyze.  I would like to rebuild and analyze all files with Clang, but I&#039;m guessing that I need to Touch each file to have Xcode include it in the build process.

Are there benefits to using Clang LLVM 1.0 as the compiler, or is using GCC and leaving &quot;Run Static Analyzer&quot; checked in the Project Settings enough?  Any advice would be appreciated.

Thanks, and keep up the great work.</description>
		<content:encoded><![CDATA[<p>Hi John,</p>
<p>Thanks for the article.  Clang appears to be a great tool and I would love to add it to my kit, but I&#8217;ve run into a few problems:</p>
<p>When I try to set the C/C++ Compiler Version in my Project Settings to Clang LLVM 1.0, I get the error &#8220;Library not found for -lgcc&#8221; when I attempt to build in Xcode.  When I use the system default compiler (GCC 4.2), I can get static analysis to work on a per-file basis when I Build &amp; Analyze.  I would like to rebuild and analyze all files with Clang, but I&#8217;m guessing that I need to Touch each file to have Xcode include it in the build process.</p>
<p>Are there benefits to using Clang LLVM 1.0 as the compiler, or is using GCC and leaving &#8220;Run Static Analyzer&#8221; checked in the Project Settings enough?  Any advice would be appreciated.</p>
<p>Thanks, and keep up the great work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Muchow</title>
		<link>http://MobileDeveloperTips.com/xcode/static-code-analysis-clang-and-xcode-3-2.html#comment-8108</link>
		<dc:creator>John Muchow</dc:creator>
		<pubDate>Fri, 25 Dec 2009 00:34:37 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=3698#comment-8108</guid>
		<description>Something doesn&#039;t seem right - there is only one opening { and two closing } . Did you copy the code directly from a code block that compiles?</description>
		<content:encoded><![CDATA[<p>Something doesn&#8217;t seem right &#8211; there is only one opening { and two closing } . Did you copy the code directly from a code block that compiles?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

