HomePhabricator

[analyzer] [RetainCountChecker] [NFC] Refactor the way attributes are handled

Authored by george.karpenkov on Jan 10 2019, 10:14 AM.

Description

[analyzer] [RetainCountChecker] [NFC] Refactor the way attributes are handled

Make sure all checks for attributes go through a centralized function,
which checks whether attribute handling is enabled, and performs
validation. The type of the attribute is returned.

Sadly, metaprogramming is required as attributes have no sensible static
getters.

Differential Revision: https://reviews.llvm.org/D56222

llvm-svn: 350862