[PATCH] D65198: [LLD] Do not print additional newlines after reaching error limit
Alexander Richardson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 24 09:07:37 PDT 2019
arichardson marked an inline comment as done.
arichardson added inline comments.
================
Comment at: lld/Common/ErrorHandler.cpp:166
} else if (errorCount == errorLimit) {
+ // Note: even though we call newline() in both branches, we can't place it
+ // before the conditions. If we did that, we might emit a newlines (without
----------------
MaskRay wrote:
> The comment may be too verbose... It should be obvious from the
>
> if .. else if ...
>
> pattern (there is no else branch).
>
> The test may look like:
>
> `env LLD_IN_TEST=0 ld.lld --error-limit=1 %t.o -o /dev/null 2>&1 | FileCheck %s`
>
> (You need to find a multi-line error that can be easily replicated.)
I agree this is quite long. I added the comment here to avoid future refactoring from introducing errors. With the test it is probably fine without a comment.
I'll see if I can find a message.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D65198/new/
https://reviews.llvm.org/D65198
More information about the llvm-commits
mailing list