Clang IntelliSense C++

Sysprogs forums Forums VisualGDB Clang IntelliSense C++

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #24524
    Andrzej.T
    Participant

    Hi,

    How I can turn on in Clang Intellisense suggestions for C++ keywords like:
    static_cast, const_cast, reinterpret_cast, decltype, static_assert(and also for return)?

    I’m sorry for a stupid question.

    Regards
    Andrzej Tatar

    • This topic was modified 5 years, 8 months ago by Andrzej.T.
    #24529
    Andrzej.T
    Participant

    Is this very complicated?

    Regards
    Andrzej Tatar

    #24538
    support
    Keymaster

    Hi,

    We should be able to add it. Please allow 2-3 business days for us to look into this.

    #24560
    support
    Keymaster

    OK, we have added a setting for this: Tools->Options->Text Editor->C/C++ (VisualGDB)->Advanced->Code Completion->Additional suggested C++ keywords.

    Please try this build: VisualGDB-5.4.104.3057.msi

    #24575
    Ophidian14
    Participant

    I don’t understand what was requested or what was changed but would like to.  I did static_cast< [Ctrl-Space] but just see a very long list of suggestions including things that are not types.  Can you provide an example of how to use this?

    #24577
    support
    Keymaster

    Hi,

    No problem, we will clarify. This update simply adds a list of pre-defined keywords like static_cast to the suggestion lists shown by VisualGDB. Pressing ctrl-space inside static_cast<> will still show preprocessor macros, typedefs, classes and many other object types. You can limit the display to a specific type using the filter buttons at the bottom of the suggestion list.

    #24587
    Andrzej.T
    Participant

    Thank you very much.
    It seems to work.

    PS. I think these keywords are standard in C++ 😉

    Regards,
    Andrzej Tatar

    • This reply was modified 5 years, 8 months ago by Andrzej.T.
    #24589
    support
    Keymaster

    Good to know it works. The keywords are indeed standard, however Clang itself has a fairly complex logic for suggesting different keywords based on context, that changes from version to version. And since it is maintained by the Clang team, we want to avoid making major changes to it, hence we added a very thin layer on top that unconditionally adds the keywords specified in the settings in case Clang does not suggest them yet (we do check for duplicates, so no worries about that).

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