Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP][-Wunsafe-buffer-usage] Generalize DerefSimplePtrArithFixableGadget to non-literals #68038

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jkorous-apple
Copy link
Contributor

No description provided.

@llvmbot llvmbot added clang Clang issues not falling into any other category clang:dataflow Clang Dataflow Analysis framework - https://clang.llvm.org/docs/DataFlowAnalysisIntro.html clang:analysis labels Oct 2, 2023
@github-actions
Copy link

github-actions bot commented Oct 2, 2023

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

You can test this locally with the following command:
git-clang-format --diff 93e0127b5036602d786a45f76c6daac67c590723 998d7174049deb0ec319155e3740b2d9031d2ff0 -- clang/lib/Analysis/UnsafeBufferUsage.cpp
View the diff from clang-format here.
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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:analysis clang:dataflow Clang Dataflow Analysis framework - https://clang.llvm.org/docs/DataFlowAnalysisIntro.html clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants