diff options
| author | gingerBill <bill@gingerbill.org> | 2024-06-28 11:44:05 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2024-06-28 11:44:39 +0100 |
| commit | 17efb87eef5c24bdc95da8b2406e4bde13941251 (patch) | |
| tree | c1ec168e7d03efcf738d83e82c58392a9f582116 /src/checker.cpp | |
| parent | 1747fdc3f0a88ddf851c5b2a58c4f2e04e532b84 (diff) | |
Add `-custom-attribute`
Diffstat (limited to 'src/checker.cpp')
| -rw-r--r-- | src/checker.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/checker.cpp b/src/checker.cpp index 8ccdcb9f7..734659510 100644 --- a/src/checker.cpp +++ b/src/checker.cpp @@ -3900,10 +3900,11 @@ gb_internal void check_decl_attributes(CheckerContext *c, Array<Ast *> const &at } if (!proc(c, elem, name, value, ac)) { - if (!build_context.ignore_unknown_attributes) { + if (!build_context.ignore_unknown_attributes && + !string_set_exists(&build_context.custom_attributes, name)) { ERROR_BLOCK(); error(elem, "Unknown attribute element name '%.*s'", LIT(name)); - error_line("\tDid you forget to use build flag '-ignore-unknown-attributes'?\n"); + error_line("\tDid you forget to use the build flag '-ignore-unknown-attributes' or '-custom-attribute:%.*s'?\n", LIT(name)); } } } |