Clang: Add clang query

Clang query is mechanism to use AST matcher to search for code. Think
about regular expression but in the context of AST. So you get a semantic
search tool for C++.

Change-Id: I72e882c5b53a0c52f352a3664847c4c3e4f6fc2e
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Tim Jenssen
2016-11-15 15:38:12 +01:00
parent 96187594b5
commit 9c7ff5199f
99 changed files with 4603 additions and 246 deletions

View File

@@ -34,11 +34,6 @@
namespace CppTools {
ProjectFile::ProjectFile()
: kind(CHeader)
{
}
ProjectFile::ProjectFile(const QString &file, Kind kind)
: path(file)
, kind(kind)

View File

@@ -51,7 +51,7 @@ public:
OpenCLSource = 10
};
ProjectFile();
ProjectFile() = default;
ProjectFile(const QString &file, Kind kind);
static Kind classify(const QString &file);
@@ -59,7 +59,7 @@ public:
static bool isSource(Kind kind);
QString path;
Kind kind;
Kind kind = CHeader;
};
QDebug operator<<(QDebug stream, const CppTools::ProjectFile &cxxFile);