C++20 intellisense support

Sysprogs forums Forums VisualGDB C++20 intellisense support

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #33118
    oto313
    Participant

    Hi,

    Does clang intellisense support C++20? What version of clang intellisense is bundled with VisualGDB?

    Thanks

    #33120
    support
    Keymaster

    Hi,

    Our Clang IntelliSense uses Clang 6.0 that supports many of the C++20 features. That said, since it uses the headers directly from your toolchain, the toolchain must support C++20 as well and it should be selected via the “language standard” setting in project properties, as many toolchains default to a lower C++ language standard version.

    #33139
    oto313
    Participant

    Hi,

    I have problem when I switch to c++2a. It says for example “Error: unknown type name “‘BulkMotorSettings’; did you mean ‘std::BulkMotorSettings'” see attachment. For every type included from another file it says “Error: unknown type name ‘Class’; did you mean ‘std::Class”. When I switch back to c++17 it works as expected. Do you know where could be a problem? The project is compile successfully with c++17 and with c++2a. There is problem only with intellisense

     

    Thanks

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

    Hi,

    If the compilation is working, most likely some parts of the platform headers use C++20 features that are not yet supported by our Clang IntelliSense engine. We are planning to release a major update to the engine in the next few months, so it should take care of it.

    Until then, the only way to troubleshoot such issues would be to narrow them down to a specific broken identifier, checking where it is actually defined, and trying to move the definition around to see what triggers the issue. Most likely, IntelliSense stops parsing when it encounters a very specific language construct that it cannot work around, so the entities declared after it are not recognized. If you can locate a specific construct causing it, you can try wrapping it with #ifndef __SYSPROGS_CODESENSE__ so that the IntelliSense engine will ignore it.

    #33162
    oto313
    Participant

    Ok thanks I will wait for next release. Hope it will be soon.

    #34578
    Timo Engelmann
    Participant

    <p style=”text-align: left;”>Hi,

    is there an update regarding the C++20 support of Intellisense?

    I use
    – VisualGDB 5.6R9 build 4777
    – STM32 CMake Project with ARM toolchain GCC 12.2.1 / GDB 12.2

    I need the C++20 standard. The project compiles without issues.
    But with C++20 the Intellisense don’t work.
    In Error List window following ist shown:

    Severity Code Description Project File Line Suppression State
    Error [Clang IntelliSense] Error: invalid value ‘gnu++20’ in ‘-std=gnu++20’ 1

    After setting back to C++17, the Intellisense is working.

    How can I solve the issue?

    Best regards,
    Timo

    </p>

    #34580
    support
    Keymaster

    Hi,

    Sorry for the delay with updating IntelliSense. In the past year we have been working on a new software tracing engine that allows recording the values of various variables at arbitrary moments without disrupting the program. It allows easily debugging issues that would otherwise be impossible to reproduce under debugger, or that would require excessive amount of stepping and note-taking. So, we prioritized it over the IntelliSense engine update.

    We have recently released VisualGDB 6.0 Beta 1 introducing the tracing engine, and are working on another update to it.

    IntelliSense update is the next thing on our plan and we expect to release another Beta using the latest Clang in September.

    As a workaround until then, please consider adding “-std=c++17” to VisualGDB Project Properties -> IntelliSense Settings -> Additional flags for C++ files. It will allow IntelliSense to recognize C++17 features even if the underlying build system reports that it’s using C++20.

    #34581
    Timo Engelmann
    Participant

    Thanks for the response. I will try the workaround.

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