Commit 1f2b5954 authored by Thiago Macieira's avatar Thiago Macieira
Browse files

Ignore the ICC lines about using or creating a PCH file



Qt Creator has been showing them as errors, but they're little more than
noise in the output.

Creator still doesn't understand "remark" lines from ICC, but that's
something for another day.

Change-Id: Ic894fe41f92a677ddbe09beb0ea4c557edeb0547
Reviewed-by: default avatarTobias Hunger <tobias.hunger@theqtcompany.com>
parent ab8b1f96
......@@ -61,11 +61,22 @@ LinuxIccParser::LinuxIccParser()
m_caretLine.setMinimal(true);
QTC_CHECK(m_caretLine.isValid());
// ".pch/Qt5Core.pchi.cpp": creating precompiled header file ".pch/Qt5Core.pchi"
// "animation/qabstractanimation.cpp": using precompiled header file ".pch/Qt5Core.pchi"
m_pchInfoLine.setPattern(QLatin1String("^\".*\": (creating|using) precompiled header file \".*\"\n$"));
m_pchInfoLine.setMinimal(true);
QTC_CHECK(m_pchInfoLine.isValid());
appendOutputParser(new LdParser);
}
void LinuxIccParser::stdError(const QString &line)
{
if (m_pchInfoLine.indexIn(line) != -1) {
// totally ignore this line
return;
}
if (m_expectFirstLine && m_firstLine.indexIn(line) != -1) {
// Clear out old task
Task::TaskType type = Task::Unknown;
......@@ -143,6 +154,13 @@ void ProjectExplorerPlugin::testLinuxIccOutputParsers_data()
<< QList<Task>()
<< QString();
QTest::newRow("pch creation")
<< QString::fromLatin1("\".pch/Qt5Core.pchi.cpp\": creating precompiled header file \".pch/Qt5Core.pchi\"")
<< OutputParserTester::STDERR
<< QString() << QString()
<< QList<Task>()
<< QString();
QTest::newRow("undeclared function")
<< QString::fromLatin1("main.cpp(13): error: identifier \"f\" is undefined\n"
" f(0);\n"
......@@ -157,6 +175,23 @@ void ProjectExplorerPlugin::testLinuxIccOutputParsers_data()
Constants::TASK_CATEGORY_COMPILE))
<< QString();
// same, with PCH remark
QTest::newRow("pch use+undeclared function")
<< QString::fromLatin1("\"main.cpp\": using precompiled header file \".pch/Qt5Core.pchi\"\n"
"main.cpp(13): error: identifier \"f\" is undefined\n"
" f(0);\n"
" ^\n"
"\n")
<< OutputParserTester::STDERR
<< QString() << QString::fromLatin1("\n")
<< (QList<Task>()
<< Task(Task::Error,
QLatin1String("identifier \"f\" is undefined\nf(0);"),
Utils::FileName::fromUserInput(QLatin1String("main.cpp")), 13,
Constants::TASK_CATEGORY_COMPILE))
<< QString();
QTest::newRow("private function")
<< QString::fromLatin1("main.cpp(53): error #308: function \"AClass::privatefunc\" (declared at line 4 of \"main.h\") is inaccessible\n"
" b.privatefunc();\n"
......
......@@ -53,6 +53,7 @@ private:
QRegExp m_firstLine;
QRegExp m_continuationLines;
QRegExp m_caretLine;
QRegExp m_pchInfoLine;
bool m_expectFirstLine;
int m_indent;
......
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