The InputArgList move assignment operator releases memory before copying fields, but it doesn't check against self-assignment. I haven't seen the self-assignment happen, but it doesn't look safe.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Any chance of adding unit test coverage for this?
llvm/include/llvm/Option/ArgList.h | ||
---|---|---|
428–429 | I'd probably reduce indentation with an early return, even if it means duplicating the (fairly simple) return expression. But no big deal either way. |
I'd probably reduce indentation with an early return, even if it means duplicating the (fairly simple) return expression. But no big deal either way.