[PATCH] D55076: [analyzer] RetainCountChecker: recognize that OSObject can be created directly using an operator "new"

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 30 11:20:54 PST 2018


On Fri, Nov 30, 2018 at 2:19 PM George Karpenkov <ekarpenkov at apple.com> wrote:
>
> Thanks and sorry about the trouble. I’ll recommit with size_t.

No worries, it happens! FYI, I also had to commit r348023 as part of
the reverts.

~Aaron
>
> On Nov 30, 2018, at 10:56 AM, Aaron Ballman <aaron at aaronballman.com> wrote:
>
> On Fri, Nov 30, 2018 at 9:37 AM Artem Dergachev via Phabricator via
> cfe-commits <cfe-commits at lists.llvm.org> wrote:
>
>
> 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
>
>
> I reverted r347949 through r347951 in r348020 to get the bots back to green.
>
> ~Aaron
>
>
>
> Repository:
>  rC Clang
>
> CHANGES SINCE LAST ACTION
>  https://reviews.llvm.org/D55076/new/
>
> https://reviews.llvm.org/D55076
>
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
>


More information about the cfe-commits mailing list