[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 07:10:20 PDT 2024
================
@@ -613,7 +613,7 @@ bool DarwinAsmParser::parseDirectiveLinkerOption(StringRef IDVal, SMLoc) {
return TokError("expected string in '" + Twine(IDVal) + "' directive");
std::string Data;
- if (getParser().parseEscapedString(Data))
+ if (getParser().parseEscapedString(Data, false))
----------------
chestnykh wrote:
I agree with you. Such a code with newlines in strange places most likely can only appear if it is written manually.
So i i think that prohibiting of newlines in all `parseEscapedString()` places is a good idea
https://github.com/llvm/llvm-project/pull/98060
More information about the llvm-commits
mailing list