[PATCH] D13071: [PATCH] New checker for mismatched operator new/operator delete definitions

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 29 06:14:07 PDT 2015


aaron.ballman marked 3 inline comments as done.
aaron.ballman added a comment.

In http://reviews.llvm.org/D13071#255446, @alexfh wrote:

> Looks good with a few comments.
>
> Thanks for the new check! Do you think whether this could be a compiler warning some day?


I thought about implementing it as a frontend warning, but it seemed somewhat expensive for there (since it would have to be triggered on every TU completion). However, it might be reasonable to move it in there at some point.

Thank you for the reviews! I've commit in r248791.

~Aaron


================
Comment at: test/clang-tidy/misc-new-delete-overloads.cpp:3
@@ +2,3 @@
+
+typedef unsigned int size_t;
+
----------------
alexfh wrote:
> I think, "unsigned long" should be used instead (and we might have to define it differently for different platforms).
I get a type redefinition error then, so I removed the typedef declaration entirely and will watch the bots to make sure this isn't an artifact of being on an MSVC build.


http://reviews.llvm.org/D13071





More information about the cfe-commits mailing list