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

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 31 10:37:13 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,
----------------
erichkeane wrote:

```suggestion
class EnumArgument<string name, string type, bit external_type, list<string> values,
```

Also, you need to update the comment on `EnumArgument`.  The name suggestion is an attempt to make it more clear what this means.

Also: I see we have values at the 'end' with default, instead of doing all the mods in `Attr.td`, can we move this external to the end as well with a default 'false' value?

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


More information about the cfe-commits mailing list