[PATCH] D136090: Handle errors in expansion of response files

2022-11-04 Thread Mikael Holmén via Phabricator via cfe-commits
uabelho added a comment. In D136090#3905845 , @sepavloff wrote: > Thank you for reporting the issue. It was fixed in fdab9f1203ee > . Thanks! Repository: rG LLVM Github Monorepo C

[PATCH] D136090: Handle errors in expansion of response files

2022-11-03 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. Thank you for reporting the issue. It was fixed in fdab9f1203ee . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136090/new/ https://reviews.llvm.org/D1

[PATCH] D136090: Handle errors in expansion of response files

2022-11-01 Thread Mikael Holmén via Phabricator via cfe-commits
uabelho added a comment. Hello, I'm wondering if this is really working as expected/intended. With this patch, if I do clang empty.c @atfileesc.txt -dry-run on an empty file empty.c and atfileesc.txt containing just -I @name-with-at/ then I get the following error cannot open file: /r

[PATCH] D136090: Handle errors in expansion of response files

2022-10-29 Thread Serge Pavlov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG17eb198de934: Handle errors in expansion of response files (authored by sepavloff). Changed prior to commit: https://reviews.llvm.org/D136090?vs=469978&id=471753#toc Repository: rG LLVM Github Monore

[PATCH] D136090: Handle errors in expansion of response files

2022-10-29 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136090/new/ https://reviews.llvm.org/D136090 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[PATCH] D136090: Handle errors in expansion of response files

2022-10-28 Thread Michał Górny via Phabricator via cfe-commits
mgorny accepted this revision. mgorny added a comment. This revision is now accepted and ready to land. LGTM Comment at: clang/unittests/Driver/ToolChainTest.cpp:604-606 + char *StrBuff = (char *)Alloc.Allocate(6, 2); + std::memcpy(StrBuff, "\xFF\xFE\x00\xD8\x00\x00", 6); +

[PATCH] D136090: Handle errors in expansion of response files

2022-10-28 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: clang/unittests/Driver/ToolChainTest.cpp:604-606 + char *StrBuff = (char *)Alloc.Allocate(6, 2); + std::memcpy(StrBuff, "\xFF\xFE\x00\xD8\x00\x00", 6); + StringRef BadUTF(StrBuff, 6); mgorny wrote: > Wouldn't it be

[PATCH] D136090: Handle errors in expansion of response files

2022-10-28 Thread Michał Górny via Phabricator via cfe-commits
mgorny added inline comments. Comment at: clang/unittests/Driver/ToolChainTest.cpp:604-606 + char *StrBuff = (char *)Alloc.Allocate(6, 2); + std::memcpy(StrBuff, "\xFF\xFE\x00\xD8\x00\x00", 6); + StringRef BadUTF(StrBuff, 6); Wouldn't it be possible to use `st

[PATCH] D136090: Handle errors in expansion of response files

2022-10-27 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. Ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136090/new/ https://reviews.llvm.org/D136090 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[PATCH] D136090: Handle errors in expansion of response files

2022-10-23 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: clang/lib/Driver/Driver.cpp:1029 if (llvm::sys::path::is_relative(CfgFilePath)) { - if (getVFS().makeAbsolute(CfgFilePath)) -return true; - auto Status = getVFS().status(CfgFilePath); - i

[PATCH] D136090: Handle errors in expansion of response files

2022-10-23 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 469978. sepavloff added a comment. Updated patch Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136090/new/ https://reviews.llvm.org/D136090 Files: clang/include/clang/Basic/DiagnosticDriverKinds.td clang

[PATCH] D136090: Handle errors in expansion of response files

2022-10-22 Thread Michał Górny via Phabricator via cfe-commits
mgorny added inline comments. Comment at: clang/lib/Driver/Driver.cpp:1029 if (llvm::sys::path::is_relative(CfgFilePath)) { - if (getVFS().makeAbsolute(CfgFilePath)) -return true; - auto Status = getVFS().status(CfgFilePath); - if (

[PATCH] D136090: Handle errors in expansion of response files

2022-10-22 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: llvm/lib/Support/CommandLine.cpp:1188 + // macros. + if (!RelativeNames && !InConfigFile) return Error::success(); rovka wrote: > Why do you need to add `!InConfigFile` here and below? It is not necessary, beca

[PATCH] D136090: Handle errors in expansion of response files

2022-10-22 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 469957. sepavloff added a comment. Small changes proposed by reviewers Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136090/new/ https://reviews.llvm.org/D136090 Files: clang/include/clang/Basic/Diagnostic

[PATCH] D136090: Handle errors in expansion of response files

2022-10-21 Thread Michał Górny via Phabricator via cfe-commits
mgorny added inline comments. Comment at: llvm/lib/Support/CommandLine.cpp:1205 +if (ArgStr[0] == '@') { + FileName = ArgStr.drop_front(1); + if (!llvm::sys::path::is_relative(FileName)) Also, I think you can use `consume_front()` here. Repository

[PATCH] D136090: Handle errors in expansion of response files

2022-10-21 Thread Diana Picus via Phabricator via cfe-commits
rovka added a comment. Nice tests! :) I have one microscopic nit and one question (because I don't know an awful lot about config files). Thanks for working on this. Comment at: llvm/lib/Support/CommandLine.cpp:1188 + // macros. + if (!RelativeNames && !InConfigFile) re

[PATCH] D136090: Handle errors in expansion of response files

2022-10-21 Thread Diana Picus via Phabricator via cfe-commits
rovka added inline comments. Comment at: clang/test/Driver/config-file-errs.c:16 // RUN: not %clang --config somewhere/nonexistent-config-file 2>&1 | FileCheck %s -check-prefix CHECK-NONEXISTENT -// CHECK-NONEXISTENT: configuration file '{{.*}}somewhere/nonexistent-config-file

[PATCH] D136090: Handle errors in expansion of response files

2022-10-20 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 469286. sepavloff added a comment. Make UTF-16 string properly aligned Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136090/new/ https://reviews.llvm.org/D136090 Files: clang/include/clang/Basic/Diagnostic

[PATCH] D136090: Handle errors in expansion of response files

2022-10-17 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff created this revision. sepavloff added reviewers: kadircet, mgorny, MaskRay, smeenai. Herald added subscribers: StephenFan, hiraditya. Herald added a reviewer: awarzynski. Herald added projects: Flang, All. sepavloff requested review of this revision. Herald added subscribers: llvm-commit