[clang] [clang-tools-extra] [Attributes][HLSL] Teach EnumArgument to refer to an external enum (PR #70835)

Justin Bogner via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 31 11:08:21 PDT 2023


================
@@ -279,12 +279,13 @@ class DefaultIntArgument<string name, int default> : IntArgument<name, 1> {
 
 // This argument is more complex, it includes the enumerator type name,
 // a list of strings to accept, and a list of enumerators to map them to.
-class EnumArgument<string name, string type, list<string> values,
+class EnumArgument<string name, string type, bit ext, list<string> values,
----------------
bogner wrote:

I put the new argument where it is to avoid having too many defaulted bools, as that can get confusing. That said, it does decrease the amount of churn to put it at the end, so I'll go with your suggestion.

Note: we could also do this without the boolean at all by looking for `::` in the type name, but that felt a bit too magical to me.

https://github.com/llvm/llvm-project/pull/70835


More information about the cfe-commits mailing list