[PATCH] D111548: [Clang] Add the `annotate_type` attribute
Erich Keane via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 29 12:34:00 PDT 2022
erichkeane added a comment.
I don't really know how useful this ends up being, these attributes (since they are part of `AttributedType` end up disappearing pretty quickly/easily. Anything that causes canonicalization will cause these to go away, they don't apply to references to these types, etc. But I otherwise don't have concerns.
HOWEVER, have you implemented the lifetime static analysis that you're wanting to do on top of this already? If you haven't, you might just find that your implementation/idea here won't work, and that you've already committed sufficiently to a design that doesn't work for it.
================
Comment at: clang/lib/AST/TypePrinter.cpp:1689
+ // the type.
+ OS << " [[clang::annotate_type]]";
+ return;
----------------
My opinion (though not attached to it) would be `clang::annotate_type(...)` or, `clang::annotate_type(<unavailable>)` or something like that.
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