4 Commits

Author SHA1 Message Date
Egor Zhdan
4d5f81cad5
[APINotes] Support nested tags
This allows annotating C/C++ structs declared within other structs using
API Notes.

rdar://132083354
2024-07-23 12:28:00 +01:00
Egor Zhdan
8a79dc7e6f
[APINotes] Support annotating C++ methods
This adds support for adding Clang attributes to C++ methods declared
within C++ records by using API Notes.

For instance:
```
Tags:
- Name: IntWrapper
  Methods:
  - Name: getIncremented
    Availability: none
```

This is the first instance of something within a C++ record being
annotated with API Notes, so it adds the necessary infra to make a C++
record an "API Notes context".

Notably this does not add support for nested C++ tags. That will be
added in a follow-up patch.

rdar://131387880
2024-07-19 13:35:13 +01:00
Fangrui Song
7c1d9b15ee [test] %clang_cc1: remove redundant actions 2024-05-04 23:08:11 -07:00
Egor Zhdan
932949dbb5
[APINotes] Upstream the remaining API Notes fixes and tests
This upstreams the last bits of Clang API Notes functionality that is
currently implemented in the Apple fork:
https://github.com/apple/llvm-project/tree/next/clang/lib/APINotes
2024-03-27 13:13:06 +00:00