[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#981679: Regex not matching Debian's clang output



I dug into the source. I can see where another guess at the path could be made or one of the existing 3 could be loosened up to match the output of Debian's clang-11 --version output.

Details:

In KDevelop source: plugins/clang/duchain/clanghelpers.cpp

QString ClangHelpers::clangVersion(){
...
QRegularExpression re(QStringLiteral("^clang version (\\d+\\.\\d+\\.\\d+)"));
...
}

The regular _expression_ won't match as the Debian version of clang-11 has the line starting with 'Debian clang' instead of just 'clang'

>clang-11 --version
Debian clang version 11.0.1-2
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin



Reply to: