[llvm] [MC,ELF] Emit warning if a string constant contains newline char. (PR #98060)
Dmitriy Chestnykh via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 9 02:39:34 PDT 2024
chestnykh wrote:
> 1. Printing text to stdout is not the correct way to report warnings, it should be done via source manager (and it is likely there are helper functions).
>
> 2. AsmLexer is a lexer, not parser. It does not know the context the lexed string is used. In some contexts the warning may not be desired. The warning, if needed, should be emitted by a parser that knows full context, e.g. in `AsmParser::parseDirectiveAscii`.
I reworked
https://github.com/llvm/llvm-project/pull/98060
More information about the llvm-commits
mailing list