Don't indent too much in errors/warnings if the filename is long.
This commit is contained in:
4
util.cpp
4
util.cpp
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
Copyright (c) 2010-2011, Intel Corporation
|
Copyright (c) 2010-2012, Intel Corporation
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
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);
|
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
|
// 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
|
// exact same error message. If so, return, so we don't redundantly
|
||||||
|
|||||||
Reference in New Issue
Block a user