This change adds a new attribute "reference_counted". This attribute is intended to annotate struct declarations that are known to use a reference counting pattern before being freed.
The long term intention is that "reference_counted" may grow additional affordances for describing the expected retain and release conventions that can be wired up to train the RetainCountChecker.
The short term intention is that "reference_counted" will be used to silence use-after-free and double-free checks that are indicating false positives when the pointer is being monitored by a reference counting system.
This change is being uploaded privately, first for review by Artem Dergachev and then later with Aaron Ballman.
I've discussed a bit with Devin Coughlin yesterday. Devin would like to be sure that we have appropriate warnings showing if this attribute is misused.
Previously, when I have been testing the use of this attribute, I mistakenly added the attribute annotation after "typedef" and before "struct". This was causing the attribute to not be discovered when the analyzer attempts to inspect the declaration. I don't recall if a compiler warning was being emitted.
This note is being written as a reminder to be evaluate what warning support is already included or adding support if necessary.