Bug 435448

Summary: Incomplete code highlighting in if with init-statement
Product: [Applications] kdevelop Reporter: David Redondo <kde>
Component: Language Support: CPP (Clang-based)Assignee: kdevelop-bugs-null
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: git master   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Screenshot of the example

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