Issue with Clang

Sysprogs forums Forums VisualGDB Issue with Clang

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #13434
    sidprice
    Participant

    When I am typing in new code and maybe make an error, I go back to correct my mistake and the red box around the change (from Clang I think) won’t go away until I close and reopen the file.

     

    Is there some other way to get rid of that red box. Image attached.

    Sid

    Attachments:
    You must be logged in to view attached files.
    #13473
    support
    Keymaster

    Hi,

    This looks like the renaming smart tag that should normally appear when you rename a function declaration (it would let you automatically adjust the references). If it’s triggering on a function call, most likely you did not include the header file with the function declaration, so Clang treats your call as an implicit declaration. Please include the correct header file in your sources to fix this.

    #13486
    sidprice
    Participant

    Thanks for the suggestion but that cannot be the problem because it happens when I type a function for the first time. As I said if I make a mistake typing the function name, then go back to correct it the red box appears and will not go away until I close the file and reopen it. At the time there is no header file that has the function name.

    Easy to reproduce:

    1. type “void aFuntion(void)
    2. Before hitting enter go back and correct the function name to be “aFunction”
    3. go to end of the line and hit enter
    4. Now you have red box until closing and reopening the file.

    Sid

    Sid

    #13494
    support
    Keymaster

    Hi,

    That would normally count as a valid attempt to rename the function. If this is annoying, we could easily add an option to disable this behavior.

    #13501
    sidprice
    Participant

    I would accept the explanation if the red box could be removed without having to close the file, that does not seem like proper behavior and it counter-productive when one is writing code. Clicking on the “light bulb” options does not remove it.

    Sid

    #13509
    support
    Keymaster

    Hi,

    This is by design – VisualGDB normally keeps automatic rename smart tags for 3 last edits. You can disable this by setting this limit to 0 as shown below:

    Please note that you would need to reopen your project after changing this setting.

    Attachments:
    You must be logged in to view attached files.
    #17256
    sidprice
    Participant

    By setting that option to zero I assume that renaming is now non-functional?

    Sid

    #17656
    support
    Keymaster

    Hi,

    This will disable renaming triggered by editing the code. You will be still able to rename the functions and variables via Edit->Refactor->Rename (or by pressing Ctrl-R, R).

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.