False Clang Intellisense Error

Sysprogs forums Forums VisualGDB False Clang Intellisense Error

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #35333
    dedvalson
    Participant

    I am seeing the  following incorrect error marking in Clang Intellisense.
    #include
    #include
    void foo() {
    std::stringstream stream;
    stream << "Some Text";
    stream << std::string("Some Other Text");
    }
    The << has the squiggly red underline. Floating over the first one displays:
    Error [Clang IntelliSense] Error: invalid operands to binary expression ('std::stringstream' (aka 'basic_stringstream') and 'const char *')
    Floating over the second one displays:
    Error [Clang IntelliSense] Error: invalid operands to binary expression ('std::stringstream' (aka 'basic_stringstream') and 'std::string' (aka 'basic_string'))
    The error can be reproduced by taking the standard “Blink” demo project and adding the c++ file above to it.
    Is there a workaround for this?

    • This topic was modified 10 months, 1 week ago by dedvalson.
    • This topic was modified 10 months, 1 week ago by dedvalson.
    #35336
    bflannery
    Participant

    What happens if you wrap it in a __cplusplus guard? Looks like it is treating that source as a c file.

    #35337
    dedvalson
    Participant

    Just tried the __cplusplus guard, it made no difference.

    Thanks for the suggestion.

     

    #35338
    dedvalson
    Participant

    Wow, I left out all the details.

    This is an ESP-IDF 5.02 project.

    I am using:

    ESP32 toolchain 12.2.0/12.1/r1

    VisualGDB 5.6R9 (build 4777)

     

    #35339
    support
    Keymaster

    Hi,

    Sorry, it doesn’t look like any known issue. Most likely, some file somewhere got corrupt and is interfering with IntelliSense.

    Our best advice would be to reset the environment (toolchain, ESP-IDF) and try creating a new project from scratch. If the problem doesn’t reappear on the new project, try comparing the project files between the working and non-working projects to pinpoint the setting that could be causing this.

    #35345
    dedvalson
    Participant

    Hi,

    In response to your request, I reloaded my toolchain and it did in fact solve the problem.

    Thanks for the help.

    Don

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