From 17efb87eef5c24bdc95da8b2406e4bde13941251 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Fri, 28 Jun 2024 11:44:05 +0100 Subject: Add `-custom-attribute` --- src/checker.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/checker.cpp') 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 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)); } } } -- cgit v1.2.3