You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PointerVariableConstraint::extractBaseType tries to use the base type as it was originally written in the source (to preserve any macros), but the code path in rewriteMultiDecl for variables after the first whose type hasn't changed does not: it uses Decl::print, which reconstructs the declaration from the AST, losing any macros. So running 3C on the following input (a variation of our actual definedType.c test):
#definemy_ulong unsigned long
my_ulong*p, x;
gives:
#define my_ulong unsigned long
_Ptr<my_ulong> p = ((void *)0);
unsigned long x;
Ideally, 3C would somehow keep the macro in x.
This issue is probably low priority, but I thought I would file it anyway in case anyone has thoughts to add.