[cfe-dev] Clang and Swift
Anna Zaks via cfe-dev
cfe-dev at lists.llvm.org
Mon Dec 7 09:10:55 PST 2015
> On Dec 4, 2015, at 3:11 PM, James Y Knight <jyknight at google.com> wrote:
> On Dec 4, 2015, at 5:57 PM, Anna Zaks <ganna at apple.com <mailto:ganna at apple.com>> wrote:
>>> On Dec 4, 2015, at 2:46 PM, James Y Knight <jyknight at google.com <mailto:jyknight at google.com>> wrote:
>>> Without having looked into it...
>>> If people need a feature like this, I'm wondering if it would make sense to parse a special file containing normalish C/C++/ObjC declarations, and use those to replace or augment attributes from matching declarations in the normal parse. Requiring a special YAML and binary format reader/writer seems unfortunate, especially as it looks nowhere close to being generically useful, beyond exactly what Swift needed.
>> The use cases described by Sean and me have nothing to do with Swift. The static analyzer (as well as other bug finding tools) often need to have more information than what’s already in the code. The clang static analyzer already has a growing body of hardcoded APIs.
> Sorry I should have written more clearly. I meant that looking at the *current* implementation of API Notes, the YAML/binary formats look very much specific to supporting only those attributes needed by swift, and do not look generically usable. I can certainly see the concept in general being generically useful.
Good point, the format is limited to s small set of annotations and will need to be extended. Although, we do have a static analyzer checker for nullability, which the primary annotation it supports.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev