george.karpenkov added inline comments.
================
Comment at: cfe/trunk/lib/Analysis/AnalysisDeclContext.cpp:607
+AnalysisDeclContextManager::~AnalysisDeclContextManager() {
+ if (!BdyFrm)
+ delete BdyFrm;
----------------
alexfh wrote:
> This is an almost guaranteed memory leak. I think, you meant `if (BdyFrm)
> delete BdyFrm;`. But `delete` deals well with `nullptr`, so just delete the
> pointer unconditionally. But first consider making `BdyFrm` a
> `std::unique_ptr`. From a cursory look I don't see any reasons not to.
@alexfh yes, this was fixed.
Also, yes, https://reviews.llvm.org/D39220
Repository:
rL LLVM
https://reviews.llvm.org/D39208
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits