[PATCH] D111548: [Clang] Add the `annotate_type` attribute

Martin Böhme via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 4 07:16:50 PDT 2022


mboehme marked an inline comment as done.
mboehme added a comment.

In D111548#3483326 <https://reviews.llvm.org/D111548#3483326>, @xbolva00 wrote:

> This patch should not land until we see some real use cases to justify new hundreds of lines of code. We should more careful and take maintenance cost really into account and not merge every experimental cool research extensions automatically.

I assume you've seen the RFC <https://discourse.llvm.org/t/rfc-lifetime-annotations-for-c/61377> for the primary use case (Rust-style lifetime annotations for C++) that motivates this change?

There's a bit of a chicken-and-egg problem here: We obviously can't submit code for the lifetime analysis tooling before the type annotations it needs are supported. We're conscious that it's not desirable to add features merely for the purpose of an experimental tool that may never be stabilized. This is why we've consciously steered away from adding attributes that are specific to our use case and are instead proposing a general-purpose type annotation attribute.

> Please answer points in “ Contributing Extensions to Clang “
> https://clang.llvm.org/get_involved.html

This makes sense. I'll add an appendix answering these points to the RFC for this change <https://discourse.llvm.org/t/rfc-new-attribute-annotate-type-iteration-2/61378>. I probably won't get round to doing this today, but I did want to let you know that I've seen your comment. I'll ping this comment again when I've added the appendix to the RFC.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D111548



More information about the cfe-commits mailing list