-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Clang static analyzer falsely reports "1 uninitialized field at the end of the constructor call" #54533
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
Comments
@llvm/issue-subscribers-clang-static-analyzer |
@Szelethus do you think this is a checker bug or something more fishy is going on, like binding not showing up in RegionStore, or even if it does we're unable to load it? |
At first glace, I'd say its the latter. The checker only emits reports if it finds an |
Likely fixed by 39743580aff515ba47cb7f9ffb2b5c538cff91da |
Thank you! Which clang version is the fix expected to be in? |
In clang-18 around February, unless you take this commit and cherry-pick it to a clang-17, release and build it yourself. |
A test case has been added covering this issue in #71073 |
In general we get plenty of false positives, but here the logic looks simple enough for the analyzer to be able to track it. Details follow:
Detected with CodeChecker 6.18.2
Clang version: 13.0.1
Checker name: optin.cplusplus.UninitializedObject
Checker message: 1 uninitialized field at the end of the constructor call
Attaching the issue as a screenshot from CodeChecker as it is easier to follow the logic.

The code is at: https://github.com/qt/qtbase/blob/dfb4697e4a/src/corelib/text/qstring.h#L1602-L1647
The text was updated successfully, but these errors were encountered: