aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/ApiExtractor/parser/codemodel.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2018-07-20 13:41:25 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2018-07-24 11:10:28 +0000
commit027893b4955ce9bd08f0e68960806c74d77805e2 (patch)
tree446daafb37dc35487f300564aec05e61b492abcd /sources/shiboken2/ApiExtractor/parser/codemodel.cpp
parentbbbcc44789a2206c85836fc9656389d00ca7e010 (diff)
shiboken: Add exception specification to clang parser
For exception handling, calls into C++ might need to wrapped in try/catch. Detect noexcept functions for which this can be omitted. Task-number: PYSIDE-62 Change-Id: I37aced91ace184edf211a457a60c131d516a4037 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'sources/shiboken2/ApiExtractor/parser/codemodel.cpp')
-rw-r--r--sources/shiboken2/ApiExtractor/parser/codemodel.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/sources/shiboken2/ApiExtractor/parser/codemodel.cpp b/sources/shiboken2/ApiExtractor/parser/codemodel.cpp
index 2c8042dc0..485222bb0 100644
--- a/sources/shiboken2/ApiExtractor/parser/codemodel.cpp
+++ b/sources/shiboken2/ApiExtractor/parser/codemodel.cpp
@@ -979,6 +979,16 @@ void _FunctionModelItem::setVariadics(bool isVariadics)
m_isVariadics = isVariadics;
}
+bool _FunctionModelItem::isNoExcept() const
+{
+ return m_isNoExcept;
+}
+
+void _FunctionModelItem::setNoExcept(bool n)
+{
+ m_isNoExcept = n;
+}
+
bool _FunctionModelItem::isDeleted() const
{
return m_isDeleted;
@@ -1091,6 +1101,8 @@ void _FunctionModelItem::formatDebug(QDebug &d) const
d << " [abstract]";
if (m_isExplicit)
d << " [explicit]";
+ if (m_isNoExcept)
+ d << " [noexcept]";
if (m_isInvokable)
d << " [invokable]";
formatModelItemList(d, ", arguments=", m_arguments);