https://bugs.llvm.org/show_bug.cgi?id=48633
Bug ID: 48633
Summary: False positive "uninitialized field at the end of the
constructor call
[optin.cplusplus.UninitializedObject]"
Product: clang
Version: 11.0
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Static Analyzer
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
Minimal example:
////
struct data
{
//data(int i) : m_data{i} {}
int m_data;
};
struct wrapper : public data
{
wrapper(int a, int b) : data{a}, m_wrapper{b} {}
int m_wrapper;
};
int main()
{
wrapper wrapped_data{1, 2};
}
////
m_data is reported uninitialized when struct data has no explicitly defined
constructor. See https://godbolt.org/z/esWonj
Reproducible on llvm 9,10 and 11.
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs