diff options
| author | kaizhangNV <149626564+kaizhangNV@users.noreply.github.com> | 2024-05-02 09:22:44 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-02 09:22:44 -0700 |
| commit | d53d793db6f4d82358ada700e1bd98b497384cdc (patch) | |
| tree | 0a04dd7288a7eada43cf3c07753048ba9f406e10 /tools/slang-reflection-test | |
| parent | b490414975d9336d112f681a986d116ab8616303 (diff) | |
Fix reflection-test issue (#4082) (#4084)
The reflection test doesn't print the user attributes decorating for
the variables, only types. Therefore, add the print for user attributes
of variables.
Diffstat (limited to 'tools/slang-reflection-test')
| -rw-r--r-- | tools/slang-reflection-test/slang-reflection-test-main.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/slang-reflection-test/slang-reflection-test-main.cpp b/tools/slang-reflection-test/slang-reflection-test-main.cpp index cd749e53d..4b5faae6b 100644 --- a/tools/slang-reflection-test/slang-reflection-test-main.cpp +++ b/tools/slang-reflection-test/slang-reflection-test-main.cpp @@ -431,6 +431,8 @@ static void emitReflectionNameInfoJSON( writer.writeEscapedString(UnownedStringSlice(name)); } +static void emitUserAttributes(PrettyWriter& writer, slang::VariableReflection* var); + static void emitReflectionModifierInfoJSON( PrettyWriter& writer, slang::VariableReflection* var) @@ -440,6 +442,8 @@ static void emitReflectionModifierInfoJSON( writer.maybeComma(); writer << "\"shared\": true"; } + + emitUserAttributes(writer, var); } static void emitUserAttributeJSON(PrettyWriter& writer, slang::UserAttribute* userAttribute) |
