forked from qt-creator/qt-creator
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:
@@ -125,7 +125,7 @@ void SdccParser::stdError(const QString &line)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
re.setPattern("^at (\\d+): (error) \\d+: (.+)$");
|
re.setPattern("^at (\\d+): (warning|error) \\d+: (.+)$");
|
||||||
match = re.match(lne);
|
match = re.match(lne);
|
||||||
if (match.hasMatch()) {
|
if (match.hasMatch()) {
|
||||||
enum CaptureIndex { MessageCodeIndex = 1, MessageTypeIndex, MessageTextIndex };
|
enum CaptureIndex { MessageCodeIndex = 1, MessageTypeIndex, MessageTextIndex };
|
||||||
@@ -292,6 +292,18 @@ void BareMetalPlugin::testSdccOutputParsers_data()
|
|||||||
categoryCompile))
|
categoryCompile))
|
||||||
<< QString();
|
<< 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")
|
QTest::newRow("Linker warning")
|
||||||
<< QString::fromLatin1("?ASlink-Warning-Couldn't find library 'foo.lib'")
|
<< QString::fromLatin1("?ASlink-Warning-Couldn't find library 'foo.lib'")
|
||||||
<< OutputParserTester::STDERR
|
<< OutputParserTester::STDERR
|
||||||
|
Reference in New Issue
Block a user