diff options
| -rw-r--r-- | sources/shiboken6/ApiExtractor/typedatabase.cpp | 18 | ||||
| -rw-r--r-- | sources/shiboken6/doc/typesystem_specifying_types.rst | 7 |
2 files changed, 24 insertions, 1 deletions
diff --git a/sources/shiboken6/ApiExtractor/typedatabase.cpp b/sources/shiboken6/ApiExtractor/typedatabase.cpp index 00a99ff57..cf9eb2404 100644 --- a/sources/shiboken6/ApiExtractor/typedatabase.cpp +++ b/sources/shiboken6/ApiExtractor/typedatabase.cpp @@ -33,6 +33,7 @@ #include "typesystemparser.h" #include "conditionalstreamreader.h" #include "predefined_templates.h" +#include "clangparser/compilersupport.h" #include <QtCore/QBuffer> #include <QtCore/QFile> @@ -246,6 +247,23 @@ QStringList TypeDatabase::typesystemKeywords() const QStringList result = m_typesystemKeywords; for (const auto &d : m_dropTypeEntries) result.append(QStringLiteral("no_") + d); + + switch (clang::emulatedCompilerLanguageLevel()) { + case LanguageLevel::Cpp11: + result.append(u"c++11"_qs); + break; + case LanguageLevel::Cpp14: + result.append(u"c++14"_qs); + break; + case LanguageLevel::Cpp17: + result.append(u"c++17"_qs); + break; + case LanguageLevel::Cpp20: + result.append(u"c++20"_qs); + break; + default: + break; + } return result; } diff --git a/sources/shiboken6/doc/typesystem_specifying_types.rst b/sources/shiboken6/doc/typesystem_specifying_types.rst index 7ee39583e..c1d25cc15 100644 --- a/sources/shiboken6/doc/typesystem_specifying_types.rst +++ b/sources/shiboken6/doc/typesystem_specifying_types.rst @@ -648,7 +648,12 @@ Conditional Processing <?endif?> There are predefined keywords indicating the operating system (``windows``, - ``unix`` and ``darwin``). The class names passed to the + ``unix`` and ``darwin``). + + The language level passed to the ``language-level`` command line option + is reflected as ``c++11``, ``c++14``, ``c++17`` or ``c++20``. + + The class names passed to the :ref:`--drop-type-entries <drop-type-entries>` command line option are also predefined, prefixed by ``no_``. This allows for example for enclosing added functions referring to those classes within |
