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,cpp -- 
clang/test/CodeGen/asm-srcloc-split-literal.c clang/lib/CodeGen/CGStmt.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/clang/lib/CodeGen/CGStmt.cpp b/clang/lib/CodeGen/CGStmt.cpp
index 5a062b74b..94a5c338e 100644
--- a/clang/lib/CodeGen/CGStmt.cpp
+++ b/clang/lib/CodeGen/CGStmt.cpp
@@ -2590,10 +2590,10 @@ static llvm::MDNode *getAsmSrcLocInfo(const 
StringLiteral *Str,
     FirstLocOffset = 0;
 
   SourceLocation FirstLineLoc = Str->getLocationOfByte(
-    FirstLocOffset, SM, LangOpts, CGF.getTarget(), &StartToken, &ByteOffset);
+      FirstLocOffset, SM, LangOpts, CGF.getTarget(), &StartToken, &ByteOffset);
 
-  Locs.push_back(llvm::ConstantAsMetadata::get(llvm::ConstantInt::get(
-    CGF.Int64Ty, FirstLineLoc.getRawEncoding())));
+  Locs.push_back(llvm::ConstantAsMetadata::get(
+      llvm::ConstantInt::get(CGF.Int64Ty, FirstLineLoc.getRawEncoding())));
 
   if (!StrVal.empty()) {
     // Add the location of the start of each subsequent line of the asm to the
@@ -2610,11 +2610,12 @@ static llvm::MDNode *getAsmSrcLocInfo(const 
StringLiteral *Str,
       if (NextLineOffset == StringRef::npos)
         NextLineOffset = i + 1;
 
-      SourceLocation LineLoc = Str->getLocationOfByte(
-        NextLineOffset, SM, LangOpts, CGF.getTarget(), &StartToken, 
&ByteOffset);
+      SourceLocation LineLoc =
+          Str->getLocationOfByte(NextLineOffset, SM, LangOpts, CGF.getTarget(),
+                                 &StartToken, &ByteOffset);
 
       Locs.push_back(llvm::ConstantAsMetadata::get(
-        llvm::ConstantInt::get(CGF.Int64Ty, LineLoc.getRawEncoding())));
+          llvm::ConstantInt::get(CGF.Int64Ty, LineLoc.getRawEncoding())));
     }
   }
 

``````````

</details>


https://github.com/llvm/llvm-project/pull/167316
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to