[all-commits] [llvm/llvm-project] 684c26: [analyzer] Remove redundant "returned to caller" s...
z1nke via All-commits
all-commits at lists.llvm.org
Wed Oct 23 01:46:59 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 684c26c89b8994fc31d1c4be0cf70d6cc6f2b7ca
https://github.com/llvm/llvm-project/commit/684c26c89b8994fc31d1c4be0cf70d6cc6f2b7ca
Author: z1nke <iamczn.cpp at gmail.com>
Date: 2024-10-23 (Wed, 23 Oct 2024)
Changed paths:
M clang/lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp
M clang/test/Analysis/stack-addr-ps.c
Log Message:
-----------
[analyzer] Remove redundant "returned to caller" suffix for compound literal in StackAddressEscape
This patch simplifies the diagnostic message in the core.StackAddrEscape
for stack memory associated with compound literals by removing the
redundant "returned to caller" suffix.
Example: https://godbolt.org/z/KxM67vr7c
```c
// clang --analyze -Xanalyzer -analyzer-checker=core.StackAddressEscape
void* compound_literal() {
return &(unsigned short){((unsigned short)0x22EF)};
}
```
warning: Address of stack memory associated with a compound literal
declared on line 2 **returned to caller returned to caller**
[core.StackAddressEscape]
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list