Skip to content

Commit

Permalink
Make tag not be allowed on macros
Browse files Browse the repository at this point in the history
  • Loading branch information
StandUp2001 committed Nov 3, 2024
1 parent b06a611 commit efe4d68
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/compiler/sema_decls.c
Original file line number Diff line number Diff line change
Expand Up @@ -2485,6 +2485,7 @@ static bool sema_analyse_attribute(SemaContext *context, ResolvedAttrData *attr_
break;
case ATTRIBUTE_TAG:
{
if (decl->decl_kind == DECL_MACRO) { RETURN_SEMA_ERROR(attr, "'@tag' is not allowed on macros."); }
decl->has_tag = true;
if (args != 2) RETURN_SEMA_ERROR(attr, "'@tag' requires two arguments.");
Expr *string = attr->exprs[0];
Expand Down

0 comments on commit efe4d68

Please sign in to comment.