From 636d6acc7adf8bf7169d38833340161dc42d3484 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Sat, 14 Jan 2017 22:13:49 +0000 Subject: Bindings: Fix handling of forward declarations It is not appropriate to decorate each forward declaration with the SIP attribute /External/. That is only needed for forward declarations of types which are defined in a different module. Local forward declarations can be omitted from the sip code. In sip code, a forward declaration followed later by a full class definition is an error. Omit forward declarations unless they are decorated with the external attribute. Introduce a rules database for consumers to decorate them with the attribute as required. --- tests/GenerateSipBindings/external_lib.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 tests/GenerateSipBindings/external_lib.cpp (limited to 'tests/GenerateSipBindings/external_lib.cpp') diff --git a/tests/GenerateSipBindings/external_lib.cpp b/tests/GenerateSipBindings/external_lib.cpp new file mode 100644 index 00000000..a08125ff --- /dev/null +++ b/tests/GenerateSipBindings/external_lib.cpp @@ -0,0 +1,13 @@ + +#include "external_lib.h" + +ExternalFwdDecl::ExternalFwdDecl(int value) + : m_value(value) +{ + +} + +int ExternalFwdDecl::getValue() const +{ + return m_value; +} -- cgit v1.2.1