<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div><br></div><div>I implemented for msvc and vi variants, here are the changes in TextDiagnosticPrinter.cpp for TextDiagnosticPrinter::HandleDiagnostic()</div><div><br></div><div><div><div><div> <span class="Apple-style-span" style="font-family: Menlo; font-size: 11px; ">        </span><span class="Apple-style-span" style="font-family: Menlo; font-size: 11px; "><span style="color: #b50da1">if</span></span><span class="Apple-style-span" style="font-family: Menlo; font-size: 11px; "> (DiagOpts->Format == </span><span class="Apple-style-span" style="font-family: Menlo; font-size: 11px; "><span style="color: #3a00d6">1</span></span><span class="Apple-style-span" style="font-family: Menlo; font-size: 11px; ">) </span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; color: rgb(20, 135, 11); "><span style="color: #000000">          </span>// msvc parsable format</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; ">          OS << PLoc.getFilename() << <span style="color: #3a00d6">'('</span> << LineNo << <span style="color: #c92524">") : "</span>;</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; ">        <span style="color: #b50da1">else</span> <span style="color: #b50da1">if</span> (DiagOpts->Format == <span style="color: #3a00d6">2</span>) </div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; color: rgb(20, 135, 11); "><span style="color: #000000">          </span>// vi command line format</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; ">          OS << PLoc.getFilename() << <span style="color: #c92524">" +"</span> << LineNo << <span style="color: #3a00d6">':'</span>;</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; ">        <span style="color: #b50da1">else</span> </div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; color: rgb(20, 135, 11); "><span style="color: #000000">          </span>// clang format</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; ">          OS << PLoc.getFilename() << <span style="color: #3a00d6">':'</span> << LineNo << <span style="color: #3a00d6">':'</span>;</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; ">        <span style="color: #b50da1">if</span> (DiagOpts->ShowColumn)</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; ">          <span style="color: #b50da1">if</span> (<span style="color: #b50da1">unsigned</span> ColNo = PLoc.getColumn())</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; ">            OS << ColNo << <span style="color: #3a00d6">':'</span>;</div></div></div></div></div></div></blockquote><div><br></div><div>I'd rather that DiagOpts->Format use an enumeration type, so this can be a switch() on the format. Otherwise, this looks fine. </div><font class="Apple-style-span" color="#006312"><br></font></div></div></blockquote><br></div><div>I copied DiagnosticOptions ShowCategories and it did not implement an enum. I was trying to copy code as much as I could to follow the coding standards. What would a good name for the enum be?</div><div><br></div><div>Thanks,</div><div><br></div><div>Andrew</div><br></body></html>