[llvm] [SimplifyLibCall][Attribute] Fix bug where we may keep `range` attr with incompatible type (PR #112649)

via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 16 19:39:39 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 f796a0c7c9299ec16d459de70a92d8a675f47a42 d105ec7ab32c3edb4ec225b26ac86a8d434f2dec --extensions cpp,h -- llvm/include/llvm/IR/Argument.h llvm/include/llvm/IR/Attributes.h llvm/include/llvm/IR/InstrTypes.h llvm/lib/Bitcode/Reader/BitcodeReader.cpp llvm/lib/IR/Attributes.cpp llvm/lib/IR/AutoUpgrade.cpp llvm/lib/IR/Function.cpp llvm/lib/IR/Verifier.cpp llvm/lib/Target/AMDGPU/AMDGPULibCalls.cpp llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp llvm/lib/Transforms/Utils/CallPromotionUtils.cpp llvm/lib/Transforms/Utils/CloneFunction.cpp llvm/lib/Transforms/Utils/InlineFunction.cpp llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/include/llvm/IR/InstrTypes.h b/llvm/include/llvm/IR/InstrTypes.h
index 54b33ec03d..71f35210f8 100644
--- a/llvm/include/llvm/IR/InstrTypes.h
+++ b/llvm/include/llvm/IR/InstrTypes.h
@@ -1463,7 +1463,9 @@ public:
 
   /// Return the return attributes for this call.
   ///
-  AttributeSet getRetAttributes() const { return getAttributes().getRetAttrs(); }
+  AttributeSet getRetAttributes() const {
+    return getAttributes().getRetAttrs();
+  }
 
   /// Return the param attributes for this call.
   ///

``````````

</details>


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


More information about the llvm-commits mailing list