<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div></div><div><br><div>
<span class="Apple-style-span" style="font-size: 12px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Andrew Fish</div><div><br></div><div><br></div></div></span><br class="Apple-interchange-newline"><br class="Apple-interchange-newline">
</div>
<br><div><div>On May 18, 2011, at 12:38 PM, Andrew Fish 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; ">Doug,<div><br></div><div>Thanks for the help on this. Please review:</div><div><br></div><div><dt id="opt_fdiagnostics-show-category" style="color: rgb(34, 34, 34); font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Verdana, Helvetica, sans-serif; line-height: 19px; font-size: small; "><b>-fdiagnostics-format=none/clang/msvc/vi</b>: Changes diagnostic output format to better match IDEs and command line tools.</dt><dd style="color: rgb(34, 34, 34); font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Verdana, Helvetica, sans-serif; line-height: 19px; font-size: small; ">This option, which defaults to "none", controls the output format of the filename, line number, and column printed in diagnostic messages. <p>For example, a format string warning will produce these three renditions based on the setting of this option:</p><pre>  t.c:3:11: warning: conversion specifies type 'char *' but the argument has type 'int'</pre><pre>  t.c(3) : warning: conversion specifies type 'char *' but the argument has type 'int'  </pre><pre>  t.c +3: warning: conversion specifies type 'char *' but the argument has type 'int' 
</pre></dd><div><br></div></div><div>Here is the patch:</div><div><br></div><div>I was unclear in CompilerInvocation.cpp if using Args.hasArg(OPT_fms_extensions) is correct. </div><div>Also I'm not sure if my usage of "none" is correct.</div><div><br></div><div>In TextDiagnosticPrinter.cpp I removed the suppression of DiagOpts->ShowColumn,  and made the defaults for msvc turn off ShowColumn. As this seemed like a better way to do it? </div><div><br></div><div><div><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; 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; "><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; 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; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>So with this patch we have the same defaults as before, but with more control over the diagnostic format from the command line.</div><div></div></div></span></span></div></div></div><span><fdiagnostics-formant.patch></span><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; 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; "><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; 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; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div></div><div><br></div><div>Thanks,</div><div><br></div><div>Andrew</div><div><br></div><div><br></div><div><div><div style="font-size: medium; ">>~/work/Clang2/build/Release/bin/clang ve.c -S -fdiagnostics-format=vi</div><div><span class="Apple-style-span" style="font-size: medium; ">ve.c +2:1: error: unknown type name 'asdkjf'</span></div><div><span class="Apple-style-span" style="font-size: medium;">asdkjf  </span></div><div><span class="Apple-style-span" style="font-size: medium;">^</span></div><div><span class="Apple-style-span" style="font-size: medium;">ve.c +2:9: error: expected identifier or '('</span></div><div><span class="Apple-style-span" style="font-size: medium;">asdkjf  </span></div><div><span class="Apple-style-span" style="font-size: medium;">        ^</span></div><div><span class="Apple-style-span" style="font-size: medium;">2 errors generated.</span></div><div style="font-size: medium; ">>~/work/Clang2/build/Release/bin/clang ve.c -S -fdiagnostics-format=msvc</div><div style="font-size: medium; ">ve.c(2) :  error: unknown type name 'asdkjf'</div><div style="font-size: medium; ">asdkjf  </div><div style="font-size: medium; ">^</div><div style="font-size: medium; ">ve.c(2) :  error: expected identifier or '('</div><div style="font-size: medium; ">asdkjf  </div><div style="font-size: medium; ">        ^</div><div style="font-size: medium; ">2 errors generated.</div><div style="font-size: medium; ">>~/work/Clang2/build/Release/bin/clang ve.c -S -fdiagnostics-format=clang</div><div style="font-size: medium; ">ve.c:2:1: error: unknown type name 'asdkjf'</div><div style="font-size: medium; ">asdkjf  </div><div style="font-size: medium; ">^</div><div style="font-size: medium; ">ve.c:2:9: error: expected identifier or '('</div><div style="font-size: medium; ">asdkjf  </div><div style="font-size: medium; ">        ^</div><div style="font-size: medium; ">2 errors generated.</div><div style="font-size: medium; ">>~/work/Clang2/build/Release/bin/clang ve.c -S </div><div style="font-size: medium; ">ve.c:2:1: error: unknown type name 'asdkjf'</div><div style="font-size: medium; ">asdkjf  </div><div style="font-size: medium; ">^</div><div style="font-size: medium; ">ve.c:2:9: error: expected identifier or '('</div><div style="font-size: medium; ">asdkjf  </div><div style="font-size: medium; ">        ^</div><div style="font-size: medium; ">2 errors generated.</div><div style="font-size: medium; ">>~/work/Clang2/build/Release/bin/clang ve.c -S -ccc-host-triple x86_64-pc-win32</div><div style="font-size: medium; ">ve.c(2) :  error: unknown type name 'asdkjf'</div><div style="font-size: medium; ">asdkjf  </div><div style="font-size: medium; ">^</div><div style="font-size: medium; ">ve.c(2) :  error: expected identifier or '('</div><div style="font-size: medium; ">asdkjf  </div><div style="font-size: medium; ">        ^</div><div style="font-size: medium; ">2 errors generated.</div><div style="font-size: medium; ">>~/work/Clang2/build/Release/bin/clang ve.c -S -ccc-host-triple x86_64-pc-win32-macho -fdiagnostics-format=clang</div><div style="font-size: medium; ">ve.c:2:1: error: unknown type name 'asdkjf'</div><div style="font-size: medium; ">asdkjf  </div><div style="font-size: medium; ">^</div><div style="font-size: medium; ">ve.c:2:9: error: expected identifier or '('</div><div style="font-size: medium; ">asdkjf  </div><div style="font-size: medium; ">        ^</div><div style="font-size: medium; ">2 errors generated.</div><div style="font-size: medium; "><br></div></div></div></div></span></span>
</div><div><br class="webkit-block-placeholder"></div>
<br></div></div></blockquote></div><br></div></body></html>