diff options
Diffstat (limited to 'sources/shiboken6/ApiExtractor/clangparser/clangutils.cpp')
| -rw-r--r-- | sources/shiboken6/ApiExtractor/clangparser/clangutils.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sources/shiboken6/ApiExtractor/clangparser/clangutils.cpp b/sources/shiboken6/ApiExtractor/clangparser/clangutils.cpp index 874ba4945..dbea15f3d 100644 --- a/sources/shiboken6/ApiExtractor/clangparser/clangutils.cpp +++ b/sources/shiboken6/ApiExtractor/clangparser/clangutils.cpp @@ -8,6 +8,8 @@ #include <QtCore/QHashFunctions> #include <QtCore/QProcess> +#include <string_view> + bool operator==(const CXCursor &c1, const CXCursor &c2) { return c1.kind == c2.kind @@ -130,6 +132,17 @@ QString getTypeName(const CXType &type) return result; } +// Quick check for "::Type" +bool hasScopeResolution(const CXType &type) +{ + CXString typeSpelling = clang_getTypeSpelling(type); + std::string_view spelling = clang_getCString(typeSpelling); + const bool result = spelling.compare(0, 2, "::") == 0 + || spelling.find(" ::") != std::string::npos; + clang_disposeString(typeSpelling); + return result; +} + // Resolve elaborated types occurring with clang 16 QString getResolvedTypeName(const CXType &type) { |
