[PATCH] D92797: APINotes: add initial stub of APINotesWriter

Gabor Marton via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 15 02:45:29 PST 2020


martong added a comment.

In D92797#2452497 <https://reviews.llvm.org/D92797#2452497>, @compnerd wrote:

> Ping

I am terribly sorry for keeping you waiting always. Thanks for your patience.



================
Comment at: clang/include/clang/APINotes/APINotesWriter.h:1
+//===-- APINotesWriter.h - API Notes Writer ---------------------*- C++ -*-===//
+//
----------------
How are we going to use this class? I mean what are the use cases to call the Writer from inside Clang?
I understand that the Reader might be used to read up the serialized APINotes file.

What will be the usual process of using an APINotes file? Is it like:
```
1) Edit `APINotesX.yaml` by hand (by a library author)
2) Serialize `APINotesX.yaml` -> `APINotesX.serialized` (Would this require a special Clang invocation?)
3) Run Clang for the usual tasks (analysis, etc) but with feeding it with `APINotesX.serialized`
```
Would it be possible to feed the raw `APINotesX.yaml` to Clang and skip the whole serialize/deserialize steps? If yes, then maybe we should put more focus on that first  (but maybe it's already too late since we added the serialization format and the reader).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D92797/new/

https://reviews.llvm.org/D92797



More information about the cfe-commits mailing list