Frontend doesn't detect mismatching uses of 'new' and 'delete'. Analyzer catches this case.
Emit warning, and recover, when:
int *p = new int[1]; delete p; // treat as 'delete[]' int *l = new int(1); delete[] l; // treat as 'delete'
Differential D4661
Detect mismatching 'new' and 'delete' uses ismailp on Jul 24 2014, 2:27 PM. Authored by
Details
Frontend doesn't detect mismatching uses of 'new' and 'delete'. Analyzer catches this case. Emit warning, and recover, when: int *p = new int[1]; delete p; // treat as 'delete[]' int *l = new int(1); delete[] l; // treat as 'delete'
Diff Detail
Event TimelineComment Actions This seems like a really nice idea.
Comment Actions Updated patch to address following issues:
Comment Actions
Comment Actions This is looking really good. Some fairly minor comments...
Comment Actions Addressed comments:
Comment Actions Addressed:
Comment Actions
Comment Actions LGTM, thanks!
|