This is a spin-off of D7930, intended to investigate the idea of working with canonical path representations throughout KDevelop.
The patch achieves this by converting paths to their canonical representation on input, currently without opt-in/out and probably not in the most efficient way.
It works on paths only; symlinks to files are left untouched.
This patch indeed makes the one from D7930 superfluous for me. For me it also triggers an apparently known issue where the parser gets confused and includes the wrong "debug.h" headers, leading to errors like Use of undeclared identifier 'CMAKE'.