[analyzer] False negatives of uninitialized variables in C++ for record types after self-assignment initialization
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
Continuing #187530 for the false negatives detected in the test cases.
1. Unions in C++
https://github.com/llvm/llvm-project/blob/4aa1590ad66a1bff9b3c74b4a2c7366473015b4c/clang/test/Analysis/issue-173210-self-assign-init.c#L48-L55
2. Self-assignment in default member initializer
https://github.com/llvm/llvm-project/blob/4aa1590ad66a1bff9b3c74b4a2c7366473015b4c/clang/test/Analysis/issue-173210-self-assign-init.c#L68-L74
We can discuss here whether the analyzer should report them.
Contributor guide
Research direction
Start with clang/test/Analysis/issue-173210-self-assign-init.c, especially lines 48-55 and 68-74, and compare the existing analyzer behavior with issue #187530. Determine whether unions and self-assignment in default member initializers should produce diagnostics, then confirm the expected behavior with maintainers. Done means the decision is recorded and the relevant regression coverage and analyzer behavior agree.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 42/100