<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>On Apr 24, 2012, at 7:31 AM, Seamus McGowan wrote:</div><div><div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Hello,<br><br>I have attempted to run Clang from the command line to see if its an issue with the XCode project but encounter this error:<br><span class="Apple-tab-span" style="white-space:pre">      </span>clang: error: unsupported option '--serialize-diagnostics'<br><br></div></blockquote><div>You can investigate if the analyzer is triggered on your code by adding a function with a bug in it and analyzing the code base.</div><div>Ex: Add the following function and run XCode->Product->Analyze:</div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><span style="color: rgb(146, 30, 103); ">int</span> foo(<span style="color: rgb(146, 30, 103); ">int</span> x) {</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">  <span style="color: rgb(146, 30, 103); ">if</span> (x == 0)</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">    <span style="color: rgb(146, 30, 103); ">return</span> 5/x;</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">  <span style="color: rgb(146, 30, 103); ">return</span> 10/x;</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">}</div></div><div><br></div><div>I am not sure exactly how you are analyzing from command line, but the error you are getting is probably due to mismatched versions of XCode and the analyzer.</div><div><br></div><div><br></div><blockquote type="cite"><div>(I'm trying to find out what this option is and where its set in the project.)<br><br></div></blockquote><div><br></div>There is also an option in the XCode Build settings called "Run Static Analyzer", which would enable the analyzes during the build.</div><div><br></div><div><blockquote type="cite"><div>NB, This project was originally started in XCode 4 , pre-ARC, and I have no idea if the project required tweaks or fixes in order to build.<br><br>Any pointers in understanding the capabilities of clang and how to work with it properly would be appreciated.<br><br>TIA<br>Seamus<br>_______________________________________________<br>cfe-dev mailing list<br><a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev<br></div></blockquote></div><br></div></body></html>