NoQ added a comment. For now the tests that i proposed may in fact accidentally work because as far as i understand you're updating the "variable contains a value returned by operator new" flag when you encounter assignment operators. The real problems will arise when the order of the assignments in the AST doesn't correspond to the order of assignments during program execution.
So one more test i'd like to have is: int *m = new int; while (true) { if (m == nullptr) { ... } // no-warning m = nullptr; } Repository: rC Clang https://reviews.llvm.org/D47554 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits