mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-11 08:48:12 +00:00
[NFC][clang] Fix static analyzer concerns
TypeLocBuilder frees resources in the destructor but doesn't have user-written copy c'tor or assignment operator, so copying it using default ones can cause double free. Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D156222
This commit is contained in:
parent
6c412b6c6f
commit
cb63fa00d1
@ -53,6 +53,9 @@ public:
|
||||
delete[] Buffer;
|
||||
}
|
||||
|
||||
TypeLocBuilder(const TypeLocBuilder &) = delete;
|
||||
TypeLocBuilder &operator=(const TypeLocBuilder &) = delete;
|
||||
|
||||
/// Ensures that this buffer has at least as much capacity as described.
|
||||
void reserve(size_t Requested) {
|
||||
if (Requested > Capacity)
|
||||
|
Loading…
Reference in New Issue
Block a user