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 origin/main HEAD --extensions c,h,cpp --
clang/lib/CodeGen/BackendUtil.cpp clang/lib/Driver/ToolChains/Clang.cpp
clang/test/DebugInfo/Generic/codeview-buildinfo.c
clang/test/Driver/cl-options.c llvm/include/llvm/MC/MCTargetOptions.h
llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
index a63e40127..8664eefc1 100644
--- a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
@@ -956,8 +956,9 @@ void CodeViewDebug::emitBuildInfo() {
const MDNode *Node = *CUs->operands().begin(); // FIXME: Multiple CUs.
const auto *CU = cast<DICompileUnit>(Node);
const DIFile *MainSourceFile = CU->getFile();
- const llvm::StringRef cwd = Asm->TM.Options.MCOptions.EmitCurrentWorkdir ?
- MainSourceFile->getDirectory() : llvm::StringRef("");
+ const llvm::StringRef cwd = Asm->TM.Options.MCOptions.EmitCurrentWorkdir
+ ? MainSourceFile->getDirectory()
+ : llvm::StringRef("");
BuildInfoArgs[BuildInfoRecord::CurrentDirectory] =
getStringIdTypeIdx(TypeTable, cwd);
BuildInfoArgs[BuildInfoRecord::SourceFile] =
``````````
</details>
https://github.com/llvm/llvm-project/pull/205736
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits