[all-commits] [llvm/llvm-project] 0a0dbf: [APINotes] Support annotating C++ methods

Egor Zhdan via All-commits all-commits at lists.llvm.org
Thu Jul 18 08:27:38 PDT 2024


  Branch: refs/heads/users/egorzhdan/apinotes-cxx-methods
  Home:   https://github.com/llvm/llvm-project
  Commit: 0a0dbf24c096c4fc0be973fb03bb48688afa447b
      https://github.com/llvm/llvm-project/commit/0a0dbf24c096c4fc0be973fb03bb48688afa447b
  Author: Egor Zhdan <e_zhdan at apple.com>
  Date:   2024-07-18 (Thu, 18 Jul 2024)

  Changed paths:
    M clang/include/clang/APINotes/APINotesReader.h
    M clang/include/clang/APINotes/APINotesWriter.h
    M clang/include/clang/APINotes/Types.h
    M clang/lib/APINotes/APINotesFormat.h
    M clang/lib/APINotes/APINotesReader.cpp
    M clang/lib/APINotes/APINotesWriter.cpp
    M clang/lib/APINotes/APINotesYAMLCompiler.cpp
    M clang/lib/Sema/SemaAPINotes.cpp
    A clang/test/APINotes/Inputs/Headers/Methods.apinotes
    A clang/test/APINotes/Inputs/Headers/Methods.h
    M clang/test/APINotes/Inputs/Headers/Namespaces.apinotes
    M clang/test/APINotes/Inputs/Headers/Namespaces.h
    M clang/test/APINotes/Inputs/Headers/module.modulemap
    A clang/test/APINotes/methods.cpp
    M clang/test/APINotes/namespaces.cpp

  Log Message:
  -----------
  [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



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list