[PATCH] D26981: Limit maximum number of errors to 1000.

Ed Maste via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 22 10:59:43 PST 2016


emaste added inline comments.


================
Comment at: ELF/Error.h:34-36
+// The maximum number of errors. If error() is called more than
+// this number, LLD bails out. 0 means no limit.
+const unsigned ErrorLimit = 1000;
----------------
davide wrote:
> I'm not sure why you want to say `ErrorLimit == 0` means no limit and not make this configurable. Either make it configurable or remove the special meaning for 0 here (and below).
> 
> I'd pretty much prefer having a limit fixed instead of configurable. I also think that 1000 is too big of a number. IIRC clang sets `-ferror-limit` to 20 by default, maybe something nearer to that threshold?
Even if the user's not inspecting each reported error, it is sometimes useful to have all of them available: for example, comparing the absolute number over time while fixing some sort of broad issue, or in cases where hundreds of identical errors, and then a small number of unique ones.

IMO if it's set to 20 (which seems like a reasonable default to me), it absolutely must be configurable.


https://reviews.llvm.org/D26981





More information about the llvm-commits mailing list