forked from qt-creator/qt-creator
BareMetal: Handle missed SDCC assembler errors
... in a form like: autovec_sdcc.a51:7: Error: <o> .org in REL area or directive / mnemonic error autovec_sdcc.a51:8: Error: <o> .org in REL area or directive / mnemonic error autovec_sdcc.a51:8: Error: <q> missing or improper operators, terminators, or delimiters Fixes: QTCREATORBUG-23084 Change-Id: I346b1970a90bc515a647477d089e66e742567733 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -110,7 +110,7 @@ void SdccParser::stdError(const QString &line)
|
||||
return;
|
||||
}
|
||||
|
||||
re.setPattern("^(.+\\.\\S+):(\\d+): (syntax error): (.+)$");
|
||||
re.setPattern("^(.+\\.\\S+):(\\d+): (Error|syntax error): (.+)$");
|
||||
match = re.match(lne);
|
||||
if (match.hasMatch()) {
|
||||
enum CaptureIndex { FilePathIndex = 1, LineNumberIndex,
|
||||
@@ -208,6 +208,18 @@ void BareMetalPlugin::testSdccOutputParsers_data()
|
||||
|
||||
// Compiler messages.
|
||||
|
||||
QTest::newRow("Assembler error")
|
||||
<< QString::fromLatin1("c:\\foo\\main.c:63: Error: Some error")
|
||||
<< OutputParserTester::STDERR
|
||||
<< QString()
|
||||
<< QString::fromLatin1("c:\\foo\\main.c:63: Error: Some error\n")
|
||||
<< (Tasks() << Task(Task::Error,
|
||||
QLatin1String("Some error"),
|
||||
Utils::FilePath::fromUserInput(QLatin1String("c:\\foo\\main.c")),
|
||||
63,
|
||||
categoryCompile))
|
||||
<< QString();
|
||||
|
||||
QTest::newRow("Compiler single line warning")
|
||||
<< QString::fromLatin1("c:\\foo\\main.c:63: warning 123: Some warning")
|
||||
<< OutputParserTester::STDERR
|
||||
|
Reference in New Issue
Block a user