[PATCH] D55076: [analyzer] RetainCountChecker: recognize that OSObject can be created directly using an operator "new"
Artem Dergachev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 30 06:36:53 PST 2018
NoQ added inline comments.
================
Comment at: clang/test/Analysis/osobject-retain-release.cpp:27
+
+ static void * operator new(unsigned long size);
+
----------------
NoQ wrote:
> I think we should use `size_t` as much as possible, because this may otherwise have weird consequences on platforms on which `size_t` is not defined as `unsigned long`. Not sure if this checker is ran on such platforms. But the test doesn't have the triple specified, so it runs under the host triple, which may be arbitrary and cause problems on buildbots.
>
> I.e.,
>
> ```
> typedef __typeof(sizeof(int)) size_t;
> // use size_t
> ```
http://lab.llvm.org:8011/builders/clang-cmake-armv8-lld/builds/440/steps/ninja%20check%202/logs/FAIL%3A%20Clang%3A%3Aosobject-retain-release.cpp
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D55076/new/
https://reviews.llvm.org/D55076
More information about the cfe-commits
mailing list