[cfe-commits] r163012 - in /cfe/trunk: lib/StaticAnalyzer/Checkers/MallocSizeofChecker.cpp lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp test/Analysis/retain-release.mm
Jordan Rose
jordan_rose at apple.com
Fri Aug 31 13:19:56 PDT 2012
On Aug 31, 2012, at 13:18 , Ted Kremenek <kremenek at apple.com> wrote:
>
> On Aug 31, 2012, at 11:19 AM, Jordan Rose <jordan_rose at apple.com> wrote:
>
>> + if (Name)
>> + if (Name->isStr("CGBitmapContextCreateWithData"))
>> + RE = S->getRetEffect();
>> }
>
> This can just be "if (Name && Name->isStr(…))"
Yeah, I had it that way originally, but then I thought that leaving it that way would make it all too easy to make the same mistake the next time we add an exception. This way when I go back with another function to add, I know right away that it should be inside the outer if-statement.
(I probably should have included braces, though.)
More information about the cfe-commits
mailing list