if (isDynamicStorage()) {
TrailingOperandStorage &storage = getDynamicStorage();
storage.~TrailingOperandStorage();
- free(&storage);
+ // Work around -Wfree-nonheap-object false positive fixed by D102728.
+ auto *mem = &storage;
+ free(mem);
} else {
getInlineStorage().~TrailingOperandStorage();
}
new (&newOperands[numOperands]) OpOperand(owner);
// If the current storage is also dynamic, free it.
- if (isDynamicStorage())
- free(&storage);
+ if (isDynamicStorage()) {
+ // Work around -Wfree-nonheap-object false positive fixed by D102728.
+ auto *mem = &storage;
+ free(mem);
+ }
// Update the storage representation to use the new dynamic storage.
dynamicStorage.setPointerAndInt(newStorage, true);