HomePhabricator

[API Notes] Enable support for overriding the types of declarations.

Authored by doug.gregor on Nov 11 2016, 4:43 PM.

Description

[API Notes] Enable support for overriding the types of declarations.

Lazily parse the types provided in API notes, and apply them to the
AST. The lazy parsing is handled via a callback from Sema into the
Parser, which parses the type in the current context. We perform some
simplistic sanity checking (e.g., the size of the replacement type is
the same as the original type), but otherwise this is a dangerous
power tool that will need to be used carefully.

The specific API notes features this enables are making use of the
'Type' field property/global variable/parameter API notes and the
'ResultType' field of method and function API notes.

Finishes rdar://problem/28943642.

apple-llvm-split-commit: 4aa4c8bd93b23c4f83ae954a9f187b7c3bdd2b40
apple-llvm-split-dir: clang/

Details

Committed
doug.gregorNov 11 2016, 4:43 PM
Parents
rG09cdee995b9c: [API Notes] Add support for expressing the types of entities.
Branches
Unknown
Tags
Unknown