Skip to content

Conversation

@fhahn
Copy link
Contributor

@fhahn fhahn commented Mar 18, 2025

No description provided.

@github-actions
Copy link

⚠️ C/C++ code formatter, clang-format found issues in your code. ⚠️

You can test this locally with the following command:
git-clang-format --diff 04ab8a5fba71f7ec65634cc118dc13798a9037fc fb1120b5a4abd716f6071ce8c7cfc81e725e9030 --extensions cpp,c -- clang/lib/CodeGen/CGCall.cpp clang/test/CodeGen/AArch64/byval-temp.c clang/test/CodeGen/atomic-arm64.c clang/test/CodeGen/attr-noundef.cpp
View the diff from clang-format here.
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp
index 434b821ad8..02bd2cfa3f 100644
--- a/clang/lib/CodeGen/CGCall.cpp
+++ b/clang/lib/CodeGen/CGCall.cpp
@@ -2800,7 +2800,8 @@ void CodeGenModule::ConstructAttributeList(StringRef Name,
       if (Decl && ((CodeGenOpts.PassByValueIsNoAlias &&
                     Decl->getArgPassingRestrictions() ==
                         RecordArgPassingKind::CanPassInRegs) ||
-                  (!AI.getIndirectByVal() && Context.getTypeDeclType(Decl).isTrivialType(Context))))
+                   (!AI.getIndirectByVal() &&
+                    Context.getTypeDeclType(Decl).isTrivialType(Context))))
         // When calling the function, the pointer passed in will be the only
         // reference to the underlying object. Mark it accordingly.
         Attrs.addAttribute(llvm::Attribute::NoAlias);

@fhahn fhahn closed this May 5, 2025
@fhahn fhahn deleted the perf/pass-by-value-noalias branch May 5, 2025 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant