Commit c76c8df1 authored by Tobias Hunger's avatar Tobias Hunger
Browse files

GccParser: Fix parsing of header files without extension



Change-Id: I4f0cc028814c0abf2ecae62aee6b38cc3e75f895
Reviewed-by: default avatarOrgad Shaneh <orgads@gmail.com>
parent d47aed52
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
using namespace ProjectExplorer; using namespace ProjectExplorer;
// opt. drive letter + filename: (2 brackets) // opt. drive letter + filename: (2 brackets)
static const char FILE_PATTERN[] = "(<command[ -]line>|([A-Za-z]:)?[^:]+\\.[^:]+):"; static const char FILE_PATTERN[] = "(<command[ -]line>|([A-Za-z]:)?[^:]+):";
static const char COMMAND_PATTERN[] = "^(.*[\\\\/])?([a-z0-9]+-[a-z0-9]+-[a-z0-9]+-)?(gcc|g\\+\\+)(-[0-9\\.]+)?(\\.exe)?: "; static const char COMMAND_PATTERN[] = "^(.*[\\\\/])?([a-z0-9]+-[a-z0-9]+-[a-z0-9]+-)?(gcc|g\\+\\+)(-[0-9\\.]+)?(\\.exe)?: ";
GccParser::GccParser() GccParser::GccParser()
...@@ -784,6 +784,37 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() ...@@ -784,6 +784,37 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
categoryCompile)) categoryCompile))
<< QString(); << QString();
QTest::newRow("qtcreatorbug-9195")
<< QString::fromLatin1("In file included from /usr/include/qt4/QtCore/QString:1:0,\n"
" from main.cpp:3:\n"
"/usr/include/qt4/QtCore/qstring.h: In function 'void foo()':\n"
"/usr/include/qt4/QtCore/qstring.h:597:5: error: 'QString::QString(const char*)' is private\n"
"main.cpp:7:22: error: within this context")
<< OutputParserTester::STDERR
<< QString() << QString()
<< ( QList<ProjectExplorer::Task>()
<< Task(Task::Unknown,
QLatin1String("In file included from /usr/include/qt4/QtCore/QString:1:0,"),
Utils::FileName::fromUserInput(QLatin1String("/usr/include/qt4/QtCore/QString")), 1,
categoryCompile)
<< Task(Task::Unknown,
QLatin1String("from main.cpp:3:"),
Utils::FileName::fromUserInput(QLatin1String("main.cpp")), 3,
categoryCompile)
<< Task(Task::Unknown,
QLatin1String("In function 'void foo()':"),
Utils::FileName::fromUserInput(QLatin1String("/usr/include/qt4/QtCore/qstring.h")), -1,
categoryCompile)
<< Task(Task::Error,
QLatin1String("'QString::QString(const char*)' is private"),
Utils::FileName::fromUserInput(QLatin1String("/usr/include/qt4/QtCore/qstring.h")), 597,
categoryCompile)
<< Task(Task::Error,
QLatin1String("within this context"),
Utils::FileName::fromUserInput(QLatin1String("main.cpp")), 7,
categoryCompile))
<< QString();
} }
void ProjectExplorerPlugin::testGccOutputParsers() void ProjectExplorerPlugin::testGccOutputParsers()
......
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