Functions of class not recognized

Sysprogs forums Forums VisualGDB Functions of class not recognized

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #24518
    MystikReasons
    Participant

    Unfortunately the fix for this one: https://sysprogs.com/w/forums/topic/members-of-structs-not-recognized/ has opened another problem with the IntelliSense and classes in C++.

    If I declare a function inside of the private sector inside a class the IntelliSense won’t shot it in the autocomplete.

    But if I declare it in the public sector it is being recognized.

    You can use the same sample project from the old topic above or just create a Embedded Project with C++ support and create a class.

    #24520
    support
    Keymaster

    Sorry, we would still need specific steps to reproduce it. You don’t need to attach a whole project, just the contents of the source file (s), the exact place where you trigger the code completion and what do you expect to see vs. actually see will be sufficient.

    #24549
    MystikReasons
    Participant

    I’ve extended the sample project with two functions, one declared in the private sector and one in the public sector.

    I’ve sent the project via the support to you.

    Steps to reproduce it:

    • Create a function inside the class (.hpp file) one private and one public
    • Change to the .cpp file and try to use the Clang IntelliSense autocomplete

    You will see that only the public function is showing up

     

    I’m using VisualGDB build 3039 with Visual Studio 2019 Preview 4.4

    #24551
    MystikReasons
    Participant

    Update: This is not only working with private functions. Just tried a private struct and it’s also not showing up

    #24557
    support
    Keymaster

    Thanks for sending us the repro project. We have fixed the issue in this build: VisualGDB-5.4.104.3057.msi

    #24569
    MystikReasons
    Participant

    It works now. Thank you!

    #24572
    MystikReasons
    Participant

    This fix unfortunately opened another problem…again ^^

    If I make a pointer to this class lets say in the main.cpp (in the repro project it is LEDBlink.cpp) and try to access the public functions/structs I can select the private function “Private_Func()” and this shouldn’t work. Also I can’t see my public structs, only my public funtion.

    I’m sending you the repro project again over the support.

    See attached screenshot for the error

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

    No problem, we have fixed it in this build: VisualGDB-5.4.104.3059.msi

    #24579
    MystikReasons
    Participant

    It got worse. Now the autocomplete is showing nothing (see screenshots)

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

    This looks correct. Based on your screenshot, there are no non-static fields or methods in the class, so code completion has nothing to show.

    #24583
    MystikReasons
    Participant

    You are completely right. I’ve mixed something up in my brain. Thank you for the fast fix

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