Commit 7b7a974e authored by Tobias Hunger's avatar Tobias Hunger
Browse files

Fix output parser misinterpreting "At top level:" messages

 * Fix the GCC output parser misinterpreting "At top level" messages
   as Errors instead of a simple message.
 * Add unit test to cover this

Task-number: QTCREATORBUG-2202
parent fa53438f
......@@ -574,6 +574,16 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
Constants::TASK_CATEGORY_COMPILE))
<< QString();
QTest::newRow("QTCREATORBUG-2206")
<< QString::fromLatin1("../../../src/XmlUg/targetdelete.c: At top level:")
<< OutputParserTester::STDERR
<< QString() << QString()
<< ( QList<ProjectExplorer::Task>()
<< Task(Task::Unknown,
QLatin1String("At top level:"),
QLatin1String("../../../src/XmlUg/targetdelete.c"), -1,
Constants::TASK_CATEGORY_COMPILE))
<< QString();
}
void ProjectExplorerPlugin::testGccOutputParsers()
......
......@@ -97,6 +97,7 @@ void LdParser::stdError(const QString &line)
Constants::TASK_CATEGORY_COMPILE);
if (m_regExpInFunction.indexIn(description) > -1 ||
description.startsWith(QLatin1String("At global scope")) ||
description.startsWith(QLatin1String("At top level")) ||
description.startsWith(QLatin1String("instantiated from ")) ||
description.startsWith(QLatin1String("In ")))
task.type = Task::Unknown;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment