[clang] [SystemZ][z/OS] Mark text files as text in ClangScanDeps (PR #127514)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 17 08:00:33 PST 2025
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 48c92dda0086d0ec2e8c1032ec53edec743c85f3 a015e8389fa263cbbb28e56e93fae733f5e94dde --extensions cpp -- clang/tools/clang-scan-deps/ClangScanDeps.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/tools/clang-scan-deps/ClangScanDeps.cpp b/clang/tools/clang-scan-deps/ClangScanDeps.cpp
index 0849782a73..3bdeb461e4 100644
--- a/clang/tools/clang-scan-deps/ClangScanDeps.cpp
+++ b/clang/tools/clang-scan-deps/ClangScanDeps.cpp
@@ -298,12 +298,14 @@ public:
};
if (llvm::sys::ExecuteAndWait(ClangBinaryPath, PrintResourceDirArgs, {},
Redirects)) {
- auto ErrorBuf = llvm::MemoryBuffer::getFile(ErrorFile.c_str(), /*IsText=*/true);
+ auto ErrorBuf =
+ llvm::MemoryBuffer::getFile(ErrorFile.c_str(), /*IsText=*/true);
llvm::errs() << ErrorBuf.get()->getBuffer();
return "";
}
- auto OutputBuf = llvm::MemoryBuffer::getFile(OutputFile.c_str(), /*IsText=*/true);
+ auto OutputBuf =
+ llvm::MemoryBuffer::getFile(OutputFile.c_str(), /*IsText=*/true);
if (!OutputBuf)
return "";
StringRef Output = OutputBuf.get()->getBuffer().rtrim('\n');
@@ -1032,7 +1034,8 @@ int clang_scan_deps_main(int argc, char **argv, const llvm::ToolContext &) {
std::unique_ptr<llvm::MemoryBuffer> TU;
std::optional<llvm::MemoryBufferRef> TUBuffer;
if (!TranslationUnitFile.empty()) {
- auto MaybeTU = llvm::MemoryBuffer::getFile(TranslationUnitFile, /*IsText=*/true);
+ auto MaybeTU =
+ llvm::MemoryBuffer::getFile(TranslationUnitFile, /*IsText=*/true);
if (!MaybeTU) {
llvm::errs() << "cannot open input translation unit: "
<< MaybeTU.getError().message() << "\n";
``````````
</details>
https://github.com/llvm/llvm-project/pull/127514
More information about the cfe-commits
mailing list