SFC01

Forum Replies Created

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • in reply to: IntelliSense issues with 5.4R3 #24414
    SFC01
    Participant

    Thank you for the support so far.

    While following your instructions to diagnose the problem I found out that the issue only occurs when I have Visual Studio set to load the last loaded solution on startup or when I open the solution by double-clicking the .sln file. So if I close Visual Studio and open it again, it loads the solution automatically. In this case however, only one of the five projects in the solution is attached in the Clang IntelliSense diagnostics console. Same if I open the solution by double-clicking the .sln file. If I manually close the solution and then open it manually from within Visual Studio, or if I set Visual Studio to not load a solution on start up and manually open it from the recent projects and solutions list, all five projects of the solution are recognized by Clang IntelliSense and everything works fine.

    There are no error lines in the Clang diagnostics log when loading the solution either way. If the solution is opened automatically by Visual Studio on start up, the log contains only operations for one project. When I manually open the solution from within VS these log entries appear for each project in the solution. For instance:

    [+0:00:00.000] Starting operation: Wrapping [path]\[projectname].vcxproj
    [+0:00:00.121] [path]\[projectname].vcxproj: found xsource files
    [+0:00:03.669] Starting operation: Reporting x+ 0 extra sources to Clang engine...
    [+0:00:03.676] Operation completed: Reporting x+ 0 extra sources to Clang engine... [6 msec]
    [+0:00:03.684] Operation completed: Wrapping [path]\[projectname].vcxproj [3681 msec]

    Additionally lines like the following show up. These do not appear when manually opening the solution from within VS.

    [+0:00:03.706] [path]\[filname].cpp will be handled by Clang IntelliSense because all open projects have it enabled

    I also tried modifying the .sln file as you suggested. I found out that when loading the solution automatically on start up, or opening it via the explorer only the first project listed inside the .sln file is attached to Clang. If I change the order of projects in the .sln file, always only the first project in the list is recognized by Clang. The number of projects in the .sln file does not seem to matter. I removed all but two projects. Still, only the project listed first in the .sln file appears in the Clang diagnostics console.

    This issue is probably related to Visual Studio and not VisualGDB. I will take to opening solutions from within Visual Studio. That resolves the issue for me.

    in reply to: IntelliSense issues with 5.4R3 #24389
    SFC01
    Participant

    Hi

    The solution consists of five projects (boot strapper, boot loader, two main applications and a test suite). There are shared files that are included by only some of the projects. In the Clang IntelliSense diagnostics console only a single project is listed under the project structure view. This is the first project that was created when the solution was created. The files that show the warning are not included or built by this particular project and are therefore not listed in the Clang console. The projects contain a lot of files so I didn’t check every single file. But it looks like all the files used by the project listed in the Clang console show no warning. All other files used exclusively by one of the other four projects show the warning. Both header and source files are affected.

    As you suggested I unloaded all projects except for one. I chose a project that was not listed in the Clang console before. The Clang diagnostics console contained no entries after that and IntelliSense painted everything red. After restarting Visual Studio the project popped up in the clang diagnostics console and IntelliSense worked fine. No warnings in any of the files of the project. Reloading other projects after that adds them to the Clang console with their respective files. Except for the test suite which shows up as ‘???’ with no files listed. Maybe that’s because it is a Win32 project instead of a VisualGDB project? I haven’t encountered any warnings since, so unloading and reloading all projects in a multi-project solution seems to fix the issue temporarily.

    However, once I restart Visual Studio with all projects loaded, again only a single project shows up in the Clang IntelliSense diagnostics console (the project that was listed there initially). The problems with IntelliSense not working in files of other projects and warnings showing up appear again.

    How can I have all projects of the solution permanently taken into account by Clang IntelliSense? Unloading and reloading every single project on every start up of Visual Studio is no viable option.

    in reply to: Clang IntelliSense navigation bar #24314
    SFC01
    Participant

    Very nice! Thank you!

    in reply to: Clang based IntelliSense engine issues #21462
    SFC01
    Participant

    Thanks, I can confirm that the preprocessor keywords are displayed correctly in build 2358. I was not aware of the separate settings for template parameters. Thanks for the info!

    • This reply was modified 5 years, 9 months ago by SFC01.
    in reply to: Clang based IntelliSense engine issues #21439
    SFC01
    Participant

    Here are the remaining screenshots.

    Attachments:
    You must be logged in to view attached files.
    in reply to: Clang based IntelliSense engine issues #21434
    SFC01
    Participant

    ConstructorInitializerIndentWidth does something different.

    ConstructorInitializerIndentWidth  = 4:

    class Test final {
      public:
        Test(const int32_t argument1, const int32_t argument2)
            : member1_{argument1},
              member2_{argument2} {}
    
      private:
        int32_t member1_;
        int32_t member2_;
    };

    ConstructorInitializerIndentWidth  = 0:

    class Test final {
      public:
        Test(const int32_t argument1, const int32_t argument2)
        : member1_{argument1},
          member2_{argument2} {}
    
      private:
        int32_t member1_;
        int32_t member2_;
    };

     

    The colors of preprocessor directives and template parameters are always displayed in the wrong color when Clang is enabled. Changing the color via the options has no effect. Preprocessor directives are always displayed in blue, regardless of the setting. User types in templates are always displayed in grey, regardless of the setting. The color of other user types can be changed though. Please see the attached screenshots.

     

    Visual Studio version 15.7.5

    VisualGDB Custom Edition version 5.4 (preview 3, build 2315)

    Attachments:
    You must be logged in to view attached files.
    in reply to: Clang based IntelliSense engine issues #21393
    SFC01
    Participant

    Thank you! The navigation bar and most of the formatting work well with the preview version.

    Are you going to fix the syntax highlighting (see first post)?

     

    I have another question. When using the native engine, initializer lists are formatted like this with spaces:

    std::vector<int32_t> list{ 1, 2, 3, 4, 5 };

    When using the Clang engine (advanced Clang-format enabled),  initializer lists are formatted without spaces:

    std::vector<int32_t> list{1, 2, 3, 4, 5};

    Is there a way to modify this, when using Clang?

     

    Sometimes, when using Clang, the “Format Document” or “Format Selection” commands don’t work. Executing the commands has no effect and the code remains unformatted. I had to restart Visual Studio and reload the project and perform a rescan of the project to get it to work again. What could be the cause for this behaviour?

     

    Visual Studio Community 2017 version 15.7.5

    VisualGDB Custom Edition version 5.4 (preview 3, build 2315)

    in reply to: STM32 BSP outdated #11411
    SFC01
    Participant

    Hi,

    So when are you going to update the BSP with the latest availabe version of the STM32F2 HAL drivers? It contains a number of very useful additions. Thanks.

Viewing 8 posts - 1 through 8 (of 8 total)