<p>Doh! Thanks for catching this. Want to add some tests? I can when I'm back....</p>
<div class="gmail_quote">On Sep 25, 2011 7:17 PM, "Benjamin Kramer" <<a href="mailto:benny.kra@googlemail.com">benny.kra@googlemail.com</a>> wrote:<br type="attribution">> Author: d0k<br>> Date: Sun Sep 25 21:14:13 2011<br>
> New Revision: 140511<br>> <br>> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=140511&view=rev">http://llvm.org/viewvc/llvm-project?rev=140511&view=rev</a><br>> Log:<br>> Don't print a stray ] at the end of diagnostics.<br>
> <br>> Also remove an obsolete utostr call.<br>> <br>> Modified:<br>> cfe/trunk/lib/Frontend/TextDiagnosticPrinter.cpp<br>> <br>> Modified: cfe/trunk/lib/Frontend/TextDiagnosticPrinter.cpp<br>> URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/TextDiagnosticPrinter.cpp?rev=140511&r1=140510&r2=140511&view=diff">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/TextDiagnosticPrinter.cpp?rev=140511&r1=140510&r2=140511&view=diff</a><br>
> ==============================================================================<br>> --- cfe/trunk/lib/Frontend/TextDiagnosticPrinter.cpp (original)<br>> +++ cfe/trunk/lib/Frontend/TextDiagnosticPrinter.cpp Sun Sep 25 21:14:13 2011<br>
> @@ -20,7 +20,6 @@<br>> #include "llvm/Support/raw_ostream.h"<br>> #include "llvm/Support/ErrorHandling.h"<br>> #include "llvm/ADT/SmallString.h"<br>> -#include "llvm/ADT/StringExtras.h"<br>
> #include <algorithm><br>> using namespace clang;<br>> <br>> @@ -1070,15 +1069,17 @@<br>> DiagnosticIDs::getCategoryNumberForDiag(Info.getID());<br>> if (DiagCategory) {<br>> OS << (Started ? "," : " [");<br>
> + Started = true;<br>> if (DiagOpts.ShowCategories == 1)<br>> - OS << llvm::utostr(DiagCategory);<br>> + OS << DiagCategory;<br>> else {<br>> assert(DiagOpts.ShowCategories == 2 && "Invalid ShowCategories value");<br>
> OS << DiagnosticIDs::getCategoryNameFromID(DiagCategory);<br>> }<br>> }<br>> }<br>> - OS << "]";<br>> + if (Started)<br>> + OS << ']';<br>
> }<br>> <br>> /// \brief Print the given string to a stream, word-wrapping it to<br>> <br>> <br>> _______________________________________________<br>> cfe-commits mailing list<br>> <a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br></div>