[PATCH] D137909: [Support] Allow complex names for annotation points and ranges via $()
Sam McCall via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 14 04:50:29 PST 2022
sammccall added a comment.
This seems pretty nice (I do find `foo$long_word^bar` a bit hard to read). I think I'm in favor, my concerns would be that for a small benefit we're:
- adding some extra complexity people have to understand
- providing more ways to write something, so more bikeshedding opportunities
- encouraging people to embed structured information in the annotations, in a way that won't be very readable *and* isn't well-supported by the API
Can you give examples of where you want to use this?
(I think we should *probably* accept this regardless, but tests want to iterate over payload-name pairs or things like that we should think a couple of steps ahead)
================
Comment at: llvm/include/llvm/Testing/Support/Annotations.h:27
+/// $definition^class Foo{}; // points can be named: "definition"
+/// $(very,complex::name)^class Foo{}; // names inside $() can contain any characters
+/// $fail[[static_assert(false, "")]] // ranges can be named too: "fail"
----------------
How do you feel about `${...}` rather than `$(...)`?
`$foo` looks like shell to me, and so `${foo}` seems like a quoting version while `$(foo)` reminds me more of some kind of embedded expression.
Small difference but maybe others would have similar associations.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137909/new/
https://reviews.llvm.org/D137909
More information about the llvm-commits
mailing list