[libc-commits] [libc] [libc] allow libc-hdrgen to work on windows files (PR #87292)

via libc-commits libc-commits at lists.llvm.org
Mon Apr 1 15:59:34 PDT 2024


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 f2a87b07e7fe1892a11ee9424d22dbaec5de5b5b ada546ddfd0d408cf207d3b08a25f491e28bbed9 -- libc/utils/HdrGen/Generator.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/libc/utils/HdrGen/Generator.cpp b/libc/utils/HdrGen/Generator.cpp
index e1e2e1004e..d926d5d9ac 100644
--- a/libc/utils/HdrGen/Generator.cpp
+++ b/libc/utils/HdrGen/Generator.cpp
@@ -84,7 +84,8 @@ void Generator::generate(llvm::raw_ostream &OS, llvm::RecordKeeper &Records) {
       Line = Line.drop_front(CommandPrefixSize);
 
       P = Line.split("(");
-      // It's possible that we have windows line endings, so strip off the extra CR.
+      // It's possible that we have windows line endings, so strip off the extra
+      // CR.
       P.second = P.second.trim();
       if (P.second.empty() || P.second[P.second.size() - 1] != ')') {
         SrcMgr.PrintMessage(llvm::SMLoc::getFromPointer(P.second.data()),
@@ -92,8 +93,7 @@ void Generator::generate(llvm::raw_ostream &OS, llvm::RecordKeeper &Records) {
                             "Command argument list should begin with '(' "
                             "and end with ')'.");
         SrcMgr.PrintMessage(llvm::SMLoc::getFromPointer(P.second.data()),
-                            llvm::SourceMgr::DK_Error,
-                            P.second.data());
+                            llvm::SourceMgr::DK_Error, P.second.data());
         SrcMgr.PrintMessage(llvm::SMLoc::getFromPointer(P.second.data()),
                             llvm::SourceMgr::DK_Error,
                             std::to_string(P.second.size()));

``````````

</details>


https://github.com/llvm/llvm-project/pull/87292


More information about the libc-commits mailing list