Better handling for tabs with message bubbles.

llvm-svn: 49001
This commit is contained in:
Ted Kremenek 2008-03-31 23:14:05 +00:00
parent f8be3836e3
commit 3bcfc6edc0
3 changed files with 12 additions and 8 deletions

View File

@ -671,15 +671,17 @@ void GRSimpleValsVisitor::VisitCFG(CFG& C, Decl& CD) {
if (!Visualize) {
if (FunctionDecl *FD = dyn_cast<FunctionDecl>(&CD)) {
llvm::cerr << "ANALYZE: " << FD->getIdentifier()->getName() << ' '
llvm::cerr << "ANALYZE: "
<< Ctx->getSourceManager().getSourceName(FD->getLocation())
<< ' ';
<< ' '
<< FD->getIdentifier()->getName()
<< '\n';
}
else if (ObjCMethodDecl *MD = dyn_cast<ObjCMethodDecl>(&CD)) {
llvm::cerr << "ANALYZE (ObjC Method): '"
<< MD->getSelector().getName() << "' "
llvm::cerr << "ANALYZE (ObjC Method): "
<< Ctx->getSourceManager().getSourceName(MD->getLocation())
<< ' ';
<< " '"
<< MD->getSelector().getName() << "'\n";
}
#if 0

View File

@ -205,7 +205,7 @@ void HTMLDiagnostics::HandlePiece(Rewriter& R,
unsigned PosNo = 0;
for (const char* c = LineStart; c != TokLogicalPtr; ++c)
PosNo += *c == '\t' ? 8 : 1;
PosNo += *c == '\t' ? 4 : 1;
// Create the html for the message.

View File

@ -36,9 +36,10 @@ void html::EscapeText(Rewriter& R, unsigned FileID, bool EscapeSpaces) {
default: break;
case ' ':
if (EscapeSpaces) R.ReplaceText(Loc, 1, "&#32;", 5);
if (EscapeSpaces) R.ReplaceText(Loc, 1, "&nbsp;", 6);
break;
case '\t': R.ReplaceText(Loc, 1, "&nbsp;&nbsp;&nbsp;&nbsp;", 6*4); break;
case '<': R.ReplaceText(Loc, 1, "&lt;", 4); break;
case '>': R.ReplaceText(Loc, 1, "&gt;", 4); break;
case '&': R.ReplaceText(Loc, 1, "&amp;", 5); break;
@ -60,10 +61,11 @@ std::string html::EscapeText(const std::string& s, bool EscapeSpaces) {
os << c; break;
case ' ':
if (EscapeSpaces) os << "&#32;";
if (EscapeSpaces) os << "&nbsp;";
else os << ' ';
break;
case '\t': for (unsigned i = 0; i < 4; ++i) os << "&nbsp;"; break;
case '<': os << "&lt;"; break;
case '>': os << "&gt;"; break;
case '&': os << "&amp;"; break;