[llvm] [hwasan] Remove memory attrs from instrumented functions. (PR #92974)

via llvm-commits llvm-commits at lists.llvm.org
Tue May 21 16:38:48 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 7630775e3ad34c426cde91732e8e7816c2a1ef5a a8cdeb7b855bc0ace846b33b82055345c4b555c2 -- llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp b/llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
index 3b1a5fce85..7f2c6f6e83 100644
--- a/llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
+++ b/llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
@@ -1590,7 +1590,7 @@ void HWAddressSanitizer::sanitizeFunction(Function &F,
   assert(!ShadowBase);
 
   F.removeFnAttr(llvm::Attribute::Memory);
-  for (auto& A : F.args())
+  for (auto &A : F.args())
     A.removeAttr(llvm::Attribute::WriteOnly);
 
   BasicBlock::iterator InsertPt = F.getEntryBlock().begin();

``````````

</details>


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


More information about the llvm-commits mailing list