Bug 435448 - Incomplete code highlighting in if with init-statement
Summary: Incomplete code highlighting in if with init-statement
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: Language Support: CPP (Clang-based) (other bugs)
Version First Reported In: git master
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-07 06:48 UTC by David Redondo
Modified: 2021-05-21 09:41 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
Screenshot of the example (9.89 KB, image/png)
2021-04-07 06:48 UTC, David Redondo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Redondo 2021-04-07 06:48:35 UTC
Created attachment 137397 [details]
Screenshot of the example

If an if statement includes an init-statement, itself and the conditional will be not highlighted fully. In addition a variable declared in the init statement will not have a semantic colored assigned to it. 
This is with C++17 selected in the project configuration.
Example:

    if (auto b = std::vector<int>().size(); b > 2) {
        b = 5;
        auto c = std::vector<int>().size();
    }
Comment 1 David Redondo 2021-05-21 09:41:34 UTC
Works after rebuilding with clang 11