[analyzer][NFC] Remove duplicated work from retain count leak report
authorValeriy Savchenko <vsavchenko@apple.com>
Fri, 16 Apr 2021 08:22:25 +0000 (11:22 +0300)
committerValeriy Savchenko <vsavchenko@apple.com>
Wed, 28 Apr 2021 15:37:37 +0000 (18:37 +0300)
commit1dad8c5036bc912078f7859d89e3ea571616fc4a
tree9cd5486d721bebcd947ccaabe5da99d1bbed166f
parentb8baa2a9132498ea286dbb0d03f005760ecc6fdb
[analyzer][NFC] Remove duplicated work from retain count leak report

Allocation site is the key location for the leak checker.  It is a
uniqueing location for the report and a source of information for
the warning's message.

Before this patch, we calculated and used it twice in bug report and
in bug report visitor.  Such duplication is not only harmful
performance-wise (not much, but still), but also design-wise.  Because
changing something about the end piece of the report should've been
repeated for description as well.

Differential Revision: https://reviews.llvm.org/D100626
clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp