diff options
Diffstat (limited to 'sources/shiboken2/ApiExtractor/clangparser/clangutils.h')
-rw-r--r-- | sources/shiboken2/ApiExtractor/clangparser/clangutils.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sources/shiboken2/ApiExtractor/clangparser/clangutils.h b/sources/shiboken2/ApiExtractor/clangparser/clangutils.h index 98d0c9752..b290aac9a 100644 --- a/sources/shiboken2/ApiExtractor/clangparser/clangutils.h +++ b/sources/shiboken2/ApiExtractor/clangparser/clangutils.h @@ -34,11 +34,16 @@ #include <QtCore/QString> #include <QtCore/QVector> +#include <functional> + QT_FORWARD_DECLARE_CLASS(QDebug) bool operator==(const CXCursor &c1, const CXCursor &c2); uint qHash(const CXCursor &c, uint seed = 0); +bool operator==(const CXType &t1, const CXType &t2); +uint qHash(const CXType &ct, uint seed); + namespace clang { QString getCursorKindName(CXCursorKind cursorKind); @@ -92,6 +97,14 @@ struct Diagnostic { QVector<Diagnostic> getDiagnostics(CXTranslationUnit tu); CXDiagnosticSeverity maxSeverity(const QVector<Diagnostic> &ds); +// Parse a template argument list "a<b<c,d>,e>" and invoke a handler +// with each match (level and string). Return begin and end of the list. +typedef std::function<void(int /*level*/, const QStringRef &)> TemplateArgumentHandler; + +QPair<int, int> parseTemplateArgumentList(const QString &l, + const TemplateArgumentHandler &handler, + int from = 0); + #ifndef QT_NO_DEBUG_STREAM QDebug operator<<(QDebug, const SourceLocation &); QDebug operator<<(QDebug, const Diagnostic &); |