Don't indent too much in errors/warnings if the filename is long.

This commit is contained in:
Matt Pharr
2012-06-04 08:53:43 -07:00
parent 22cb80399f
commit 71198a0b54

View File

@@ -1,5 +1,5 @@
/*
Copyright (c) 2010-2011, Intel Corporation
Copyright (c) 2010-2012, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -349,6 +349,8 @@ lPrint(const char *type, bool isError, SourcePos p, const char *fmt,
}
indent = lFindIndent(3, formattedBuf);
}
// Don't indent too much with long filenames
indent = std::min(indent, 8);
// Now that we've done all that work, see if we've already printed the
// exact same error message. If so, return, so we don't redundantly