[cfe-commits] r163355 - in /cfe/trunk: lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp test/Analysis/retain-release.m

Ted Kremenek kremenek at apple.com
Wed Jan 2 13:29:40 PST 2013


On Sep 6, 2012, at 4:43 PM, Jordan Rose <jordan_rose at apple.com> wrote:

> 
> On Sep 6, 2012, at 16:03 , Ted Kremenek <kremenek at apple.com> wrote:
> 
>> +    if (D->getAttr<CFReturnsNotRetainedAttr>())
>> +      os << "that is annotated as CF_RETURNS_NOT_RETAINED";
>> +    else if (D->getAttr<NSReturnsNotRetainedAttr>())
>> +      os << "that is annotated as NS_RETURNS_NOT_RETAINED";
> 
> Not everyone has these macros defined.

While technically true, there have been no complaints about this because in practice it is not an issue.  Still worth addressing, however.

> Maybe we don't care, but on our site we currently document the attribute forms and don't mention at all that (Core)Foundation includes macros for them.

We should probably update the documentation on the website.  We should also make the diagnostic logic smarter here and detect if the macro is defined when issuing the diagnostic:

  http://llvm.org/bugs/show_bug.cgi?id=14788



More information about the cfe-commits mailing list