[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
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350862
91177308-0d34-0410-b5e6-
96231b3b80d8