Skip to content

[analyzer][NFC] Remove a non-actionable dump #106232

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

Merged
merged 1 commit into from
Aug 27, 2024
Merged

Conversation

necto
Copy link
Contributor

@necto necto commented Aug 27, 2024

This dump, if it is ever executed, is not actionable by the user and might produce unwanted noise in the stderr.

The original intention behind this dump, to provide maximum information in an unexpected situation, does not outweigh the potential annoyance caused to users who might not even realize that they witnessed an unexpected situation.

@llvmbot
Copy link
Member

llvmbot commented Aug 27, 2024

@llvm/pr-subscribers-clang

@llvm/pr-subscribers-clang-static-analyzer-1

Author: Arseniy Zaostrovnykh (necto)

Changes

This dump, if it is ever executed, is not actionable by the user and might produce unwanted noise in the stderr.

The original intention behind this dump, to provide maximum information in an unexpected situation, does not outweigh the potential annoyance caused to users who might not even realize that they witnessed an unexpected situation.


Full diff: https://github.com/llvm/llvm-project/pull/106232.diff

1 Files Affected:

  • (modified) clang/lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp (-1)
diff --git a/clang/lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp
index dcf6801a73de2d..cdbede6981aa09 100644
--- a/clang/lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp
@@ -326,7 +326,6 @@ std::optional<std::string> printReferrer(const MemRegion *Referrer) {
       // warn_init_ptr_member_to_parameter_addr
       return std::nullopt;
     } else {
-      Referrer->dump();
       assert(false && "Unexpected referrer region type.");
       return std::nullopt;
     }

Copy link
Collaborator

@Xazax-hun Xazax-hun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@steakhal steakhal merged commit 6e44cb3 into llvm:main Aug 27, 2024
9 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:static analyzer clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants