Bug 498983

Summary: KDevelop built with clang/llvm 19 does not correctly highlight #define directives
Product: [Applications] kdevelop Reporter: zvova7890
Component: Code completionAssignee: kdevelop-bugs-null
Status: RESOLVED DUPLICATE    
Severity: normal CC: igorkuo
Priority: NOR    
Version First Reported In: git master   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Correct behavior
Incorrect behavior

Description zvova7890 2025-01-21 22:55:22 UTC
Created attachment 177578 [details]
Correct behavior

SUMMARY
I noticed that after an update, KDevelop no longer correctly highlights and interprets code lines using #define directives. Strings inside these directives are not highlighted as strings, and features like jumping to declarations don't work correctly. Instead, using Ctrl + Left Click takes me to a random line unrelated to the original click.

I started downgrading and rebuilding KDevelop, and eventually, when I built it with Clang/LLVM 18, everything returned to normal.

STEPS TO REPRODUCE
1. Take the system with clang/llvm 19
2. Open in KDevelop some C++ project
3. Check lines that uses #define directive

OBSERVED RESULT
Misinterpreted 

EXPECTED RESULT
Correctly treated each variable/parameter/string/etc
Comment 1 zvova7890 2025-01-21 22:56:03 UTC
Created attachment 177579 [details]
Incorrect behavior
Comment 2 zvova7890 2025-01-21 22:57:38 UTC
In attached screenshots you can see that string highlighted not as string, also I can't jump to any variable that used in put() directive call, it just put me to the random line and highlight all lines that using this directive.
Comment 3 Igor Kushnir 2025-01-22 10:31:32 UTC

*** This bug has been marked as a duplicate of bug 496985 ***