[PATCH] D123878: [AMDGPU] Add remarks to output some resource usage
Scott Linder via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 13 18:27:14 PDT 2022
scott.linder added a comment.
In D123878#3507378 <https://reviews.llvm.org/D123878#3507378>, @vangthao wrote:
> I am not sure if allowing clang to accept newlines is a good idea. It seems like clang wants to know what type of message is being outputted. For example whether this is a remark, warning, etc. but allowing for a diagnostic to output their own newline makes it ambiguous where exactly that output is coming from.
It already supports newlines in any diagnostic which doesn't use the trivial format string `"%0"`, and at least `clang/test/Misc/diag-line-wrapping.cpp` explicitly tests this behavior.
It seems reasonable that clang could add a prefix or indentation scheme while emitting multi-line diagnostics to the terminal, to help with the ambiguity issue. For example instead of the current output:
clang/test/Misc/diag-line-wrapping.cpp:8:14: error: non-static member 'f' found in multiple base-class subobjects of type 'B':
struct DD -> struct D1 -> struct B
struct DD -> struct D2 -> struct B
Maybe we could have something like:
clang/test/Misc/diag-line-wrapping.cpp:8:14: error: ...
...: non-static member 'f' found in multiple base-class subobjects of type 'B':
...: struct DD -> struct D1 -> struct B
...: struct DD -> struct D2 -> struct B
I don't know if changing this kind of output is a breaking change, though? I do know some tooling parses this output.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D123878/new/
https://reviews.llvm.org/D123878
More information about the llvm-commits
mailing list