Author Topic: Symbol look up confused by variable name and typedef being the same  (Read 2555 times)

b

  • Senior Community Member
  • Posts: 325
  • Hero Points: 26
First, I wish I could change this code (customer code) as I think this is bad practice.  Regardless, there appears to be a symbol look up bug.

Code: [Select]
typedef struct
{
    int BMCInst;
    int BusNum;
    char BusName[IPMB_BUS_LEN];
    char IPMBArgs;
}PACKED IPMBArgs;

...

void *IPMBIfcTask (void *Addr)
{
    ...
    IPMBArgs IPMBBMCArgs;
    char IPMBArgs;
    ...

Move cursor to IPMBArgs (declaration in function) and press Ctrl+, and it will advance to the next line (char variable declaration), not to the typedef.  Ctrl+/ doesn't even list the typedef in its list of references.

Hover pop up also shows definition as char IPMBArgs.
« Last Edit: August 31, 2016, 10:08:44 PM by b »

Dennis

  • Senior Community Member
  • Posts: 3965
  • Hero Points: 517
Re: Symbol look up confused by variable name and typedef being the same
« Reply #1 on: September 01, 2016, 01:16:15 AM »
Nice test case.  This will be fixed in beta5.