summaryrefslogtreecommitdiff
path: root/src/xmlpatterns/expr/qpath_p.h
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2016-07-07 10:57:03 +0200
committerMarc Mutz <marc.mutz@kdab.com>2016-07-12 06:38:56 +0000
commitd91d3536eb82075aec25f3772c4209e15b7b3060 (patch)
tree3e78419f4e2bd9e038ff2e1fa5d6639cc4b26d77 /src/xmlpatterns/expr/qpath_p.h
parent71ca09a07d1b5adf3eeefd3790250481781ba166 (diff)
downloadqtxmlpatterns-d91d3536eb82075aec25f3772c4209e15b7b3060.tar.gz
Unbreak ubsan developer-build
GCC's undefined-behavior sanitizer checks that the declared type of the object is a base class of the dynamic type of the object on each access to a member of a class type. It therefore requires the typeinfo for these types, which for polymorphic types is emitted in the TU where the vtable is emitted, too. QtPatternist::AtomicValue is a polymorphic non- exported class, so this failed at link-time. Ditto for the other cases. Fix by autotest-exporting the classes. Also, where applicable, de-inline the dtors, so the vtable (and typeinfo) are pinned to one TU. Change-Id: I5c47be779a3833433a7108a79a57d61a93ab5494 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/xmlpatterns/expr/qpath_p.h')
-rw-r--r--src/xmlpatterns/expr/qpath_p.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/xmlpatterns/expr/qpath_p.h b/src/xmlpatterns/expr/qpath_p.h
index 687fafb..51b5728 100644
--- a/src/xmlpatterns/expr/qpath_p.h
+++ b/src/xmlpatterns/expr/qpath_p.h
@@ -59,7 +59,7 @@ namespace QPatternist
* @author Frans Englich <frans.englich@nokia.com>
* @ingroup Patternist_expressions
*/
- class Path : public PairContainer
+ class Q_AUTOTEST_EXPORT Path : public PairContainer
{
public:
enum Kind
@@ -88,6 +88,7 @@ namespace QPatternist
Path(const Expression::Ptr &operand1,
const Expression::Ptr &operand2,
const Kind kind = RegularPath);
+ ~Path();
virtual Item::Iterator::Ptr evaluateSequence(const DynamicContext::Ptr &context) const;
virtual Item evaluateSingleton(const DynamicContext::Ptr &context) const;