From 04b8a45a7d20425c7b6c8abe1ad094abc063922b Mon Sep 17 00:00:00 2001 From: Simmo Saan Date: Fri, 2 Aug 2024 17:28:36 +0300 Subject: [PATCH] Visit enumerator attributes in Cabsvisit --- src/frontc/cabsvisit.ml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/frontc/cabsvisit.ml b/src/frontc/cabsvisit.ml index 6fc8dce74..444392e58 100644 --- a/src/frontc/cabsvisit.ml +++ b/src/frontc/cabsvisit.ml @@ -199,8 +199,9 @@ and childrenTypeSpecifier vis ts = if fg' != fg then Tunion( n, Some fg', extraAttrs) else ts | Tenum (n, Some ei, extraAttrs) -> let doOneEnumItem ((s, attrs, e, loc) as ei) = + let attrs' = visitCabsAttributes vis attrs in let e' = visitCabsExpression vis e in - if e' != e then (s, attrs, e', loc) else ei (* TODO: visit attrs? *) + if attrs' != attrs || e' != e then (s, attrs', e', loc) else ei in vis#vEnterScope (); let ei' = mapNoCopy doOneEnumItem ei in