ConstString is essentially trivially copyable yet it has a user defined copy constructor that copies its one member pointer. Remove it so it qualifies as trivial in the eyes of the compiler.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
lldb/include/lldb/Utility/ConstString.h | ||
---|---|---|
44–45 | Since your touching this type, why not modernize it and use an in class member initializer for m_string Then default the constructor. |
Comment Actions
Btw, this might spawn a bunch of warnings about unused ConstString variables (I remember I did a similar change locally to find unused ConstStrings some time ago) as the compiler maybe now understands that empty ConstString construction/destruction doesn't have side effects. So you might want to check for them before committing. But LGTM
Since your touching this type, why not modernize it and use an in class member initializer for m_string Then default the constructor.