Author Topic: References shows only local usage  (Read 520 times)

joecar

  • Senior Community Member
  • Posts: 278
  • Hero Points: 9
  • engineer/gearhead
Re: References shows only local usage
« Reply #15 on: February 13, 2021, 12:22:58 pm »
REVISED

@joecar:  I was able to reproduce this only by adding the file to a project,
     and turning on Document > C/C++ Options... > C/C++ Parsing Options,
     "Tag function prototypes with no return type" = ON

     Is this an option you need to have enabled?
. . .
I already have that enabled.

joecar

  • Senior Community Member
  • Posts: 278
  • Hero Points: 9
  • engineer/gearhead
Re: References shows only local usage
« Reply #16 on: February 13, 2021, 12:59:11 pm »
I think I have a simple example that shows the problem, see attached zip file containing files main.c and test.c.

main.c makes calls to functions defined in test.c.

Some of the calls in main.c are missing the parameter; doing Goto References from any of call where some instance of that call (that one or another) is missing the parameter produces only local instances.

Doing Goto References from test.c produces all instances (even the ones with missing parameter).

Try doing all 6 Goto References from main.c and compare with doing all 6 Goto References from test.c

LoL, I hope I got it right  ;D
« Last Edit: February 13, 2021, 01:01:15 pm by joecar »

joecar

  • Senior Community Member
  • Posts: 278
  • Hero Points: 9
  • engineer/gearhead
Re: References shows only local usage
« Reply #17 on: February 13, 2021, 01:14:37 pm »
See updated attached zip (main.c, test.c), lol this one compiles and runs (using Visual Studio 2019).
« Last Edit: February 13, 2021, 01:18:28 pm by joecar »

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 3221
  • Hero Points: 459
Re: References shows only local usage
« Reply #18 on: February 13, 2021, 06:35:32 pm »
Quote
Document > C/C++ Options... > C/C++ Parsing Options > Tag function prototypes with no return type

I already have that enabled.

The problem was that feature was enabled.  Do you really want that?

joecar

  • Senior Community Member
  • Posts: 278
  • Hero Points: 9
  • engineer/gearhead
Re: References shows only local usage
« Reply #19 on: February 14, 2021, 04:31:09 am »
Quote
Document > C/C++ Options... > C/C++ Parsing Options > Tag function prototypes with no return type

I already have that enabled.

The problem was that feature was enabled.  Do you really want that?
I'll try that, thanks.

joecar

  • Senior Community Member
  • Posts: 278
  • Hero Points: 9
  • engineer/gearhead
Re: References shows only local usage
« Reply #20 on: February 15, 2021, 12:02:36 am »
Quote
Document > C/C++ Options... > C/C++ Parsing Options > Tag function prototypes with no return type

I already have that enabled.

The problem was that feature was enabled.  Do you really want that?
I disabled that and references are now working correctly, thanks, appreciate your help :)

Is there a way to save to file the current options/configuration (i.e. might want different C/C++ config for different projects)...?

vandermyer

  • Community Member
  • Posts: 27
  • Hero Points: 2
Re: References shows only local usage
« Reply #21 on: February 15, 2021, 09:03:03 am »
Thanks for the fast response. Turning off option you mention seems to resolve the issue.