[clang] [WIP][-Wunsafe-buffer-usage] Generalize DerefSimplePtrArithFixableGadget to non-literals (PR #68038)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 2 14:05:31 PDT 2023
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 93e0127b5036602d786a45f76c6daac67c590723 998d7174049deb0ec319155e3740b2d9031d2ff0 -- clang/lib/Analysis/UnsafeBufferUsage.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/Analysis/UnsafeBufferUsage.cpp b/clang/lib/Analysis/UnsafeBufferUsage.cpp
index 062f57bf36b2..56e3be11d935 100644
--- a/clang/lib/Analysis/UnsafeBufferUsage.cpp
+++ b/clang/lib/Analysis/UnsafeBufferUsage.cpp
@@ -1005,9 +1005,8 @@ public:
AddOp(Result.Nodes.getNodeAs<BinaryOperator>(AddOpTag)),
OffsetLiteral(Result.Nodes.getNodeAs<IntegerLiteral>(OffsetLiteralTag)),
OffsetUnsigned(Result.Nodes.getNodeAs<Expr>(OffsetUnsignedTag)) {
- assert(OffsetLiteral || OffsetUnsigned && "Expecting some RHS");
- }
-
+ assert(OffsetLiteral || OffsetUnsigned && "Expecting some RHS");
+ }
static Matcher matcher() {
// clang-format off
``````````
</details>
https://github.com/llvm/llvm-project/pull/68038
More information about the cfe-commits
mailing list