BareMetal: Parse missed SDCC compiler warning

... in a form like:

 at 1: warning 117: unknown compiler option '--xram-loc2' ignored

Fixes: QTCREATORBUG-23083
Change-Id: If428cb7317d0c13246fcb0c1741d015a80af91b7
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Denis Shienkov
2019-10-13 17:49:10 +03:00
parent b84fecfb7d
commit 6d089f33f7

View File

@@ -125,7 +125,7 @@ void SdccParser::stdError(const QString &line)
return;
}
re.setPattern("^at (\\d+): (error) \\d+: (.+)$");
re.setPattern("^at (\\d+): (warning|error) \\d+: (.+)$");
match = re.match(lne);
if (match.hasMatch()) {
enum CaptureIndex { MessageCodeIndex = 1, MessageTypeIndex, MessageTextIndex };
@@ -292,6 +292,18 @@ void BareMetalPlugin::testSdccOutputParsers_data()
categoryCompile))
<< QString();
QTest::newRow("Compiler bad option warning")
<< QString::fromLatin1("at 1: warning 123: Some warning")
<< OutputParserTester::STDERR
<< QString()
<< QString::fromLatin1("at 1: warning 123: Some warning\n")
<< (Tasks() << Task(Task::Warning,
QLatin1String("Some warning"),
Utils::FilePath(),
-1,
categoryCompile))
<< QString();
QTest::newRow("Linker warning")
<< QString::fromLatin1("?ASlink-Warning-Couldn't find library 'foo.lib'")
<< OutputParserTester::STDERR