forked from OSchip/llvm-project
Better handling for tabs with message bubbles.
llvm-svn: 49001
This commit is contained in:
parent
f8be3836e3
commit
3bcfc6edc0
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
|
|
@ -36,9 +36,10 @@ void html::EscapeText(Rewriter& R, unsigned FileID, bool EscapeSpaces) {
|
|||
default: break;
|
||||
|
||||
case ' ':
|
||||
if (EscapeSpaces) R.ReplaceText(Loc, 1, " ", 5);
|
||||
if (EscapeSpaces) R.ReplaceText(Loc, 1, " ", 6);
|
||||
break;
|
||||
|
||||
case '\t': R.ReplaceText(Loc, 1, " ", 6*4); break;
|
||||
case '<': R.ReplaceText(Loc, 1, "<", 4); break;
|
||||
case '>': R.ReplaceText(Loc, 1, ">", 4); break;
|
||||
case '&': R.ReplaceText(Loc, 1, "&", 5); break;
|
||||
|
@ -60,10 +61,11 @@ std::string html::EscapeText(const std::string& s, bool EscapeSpaces) {
|
|||
os << c; break;
|
||||
|
||||
case ' ':
|
||||
if (EscapeSpaces) os << " ";
|
||||
if (EscapeSpaces) os << " ";
|
||||
else os << ' ';
|
||||
break;
|
||||
|
||||
case '\t': for (unsigned i = 0; i < 4; ++i) os << " "; break;
|
||||
case '<': os << "<"; break;
|
||||
case '>': os << ">"; break;
|
||||
case '&': os << "&"; break;
|
||||
|
|
Loading…
Reference in New Issue