<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Aug 22, 2011, at 8:39 PM, Ted Kremenek 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 Aug 22, 2011, at 1:59 PM, Jonathan Sauer wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div><blockquote type="cite">I'd guess/bet that XCode doesn't parse clang's output. Judging by Ted's post on this (<span class="Apple-converted-space"> </span><a href="http://llvm.org/bugs/show_bug.cgi?id=10696">http://llvm.org/bugs/show_bug.cgi?id=10696</a><span class="Apple-converted-space"> </span>) bug I was just reading tihs morning, where he implies that the XCode is doing something correctly where the console output is incorrect - if XCode was parsing clang's text output it wouldn't have any hope of getting this right. Though I wouldn't know which builds that would be applicable to.<br></blockquote><br>Oh. I guess things changed with XCode 4, when clang was integrated into the IDE as a plugin. XCode 3.2.6<br>parses clang's output (at least that's my guess from looking into XCode's "Clang LLVM 1.0.xcspec" file).<br><br></div></span></blockquote></div><br><div>That's not quite correct.</div><div><br></div><div>Xcode 4 uses a clang dylib for syntax highlighting, code completion, and indexing.  As part of this, it also obtains "live issues" from clang through an API.</div><div><br></div><div>For compilation, Xcode 4 still uses the standalone compiler.  It passes a "special" flag, -fdiagnostics-parseable-fixits, which causes the text output of the compiler to include a "serialized" version of the FIXIT hints that is easy for an external tool to process.  That information includes essentially ranges of characters to insert and delete.  This is different from the *display* of FIXITs from Clang on the command line, which runs into the problems mentioned in 10696.</div></div></blockquote><div><br></div>FWIW, -fdiagnostics-parseable-fixits is documented along with a few other "editor-parsing-friendly" diagnostics output flags at</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">    <a href="http://clang.llvm.org/docs/UsersManual.html#cl_diag_formatting">http://clang.llvm.org/docs/UsersManual.html#cl_diag_formatting</a></span></div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">   </span>- Doug</div><br></body></html>