diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-01-26 14:57:05 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-01-26 15:17:28 +0100 |
commit | 598d8194b0ea1a64e0ebba28a86c128bafa57c7c (patch) | |
tree | c81c2a85795c6218327d2c40dc2a52850a7d22ef /include | |
parent | lokdocview: fix for missing gtk_table_get_size() (diff) | |
download | core-598d8194b0ea1a64e0ebba28a86c128bafa57c7c.tar.gz core-598d8194b0ea1a64e0ebba28a86c128bafa57c7c.zip |
Visible function type RTTI for Clang -fsanitize=function
...by adding some further SAL_DLLPUBLIC_RTTI type annotations (cf.
b4f6b26b5a1a78fecfa95ec2eb7ac8b80495d8aa "SAL_DLLPUBLIC_RTTI for proper RTTI
visibility for LLVM") and by making sure relevant function types do not use
incomplete types in their parameter and return types (which would make the RTTI
hidden).
Change-Id: Id7aadcbc0704b9759968ae36266fc9ce11a2e340
Diffstat (limited to 'include')
-rw-r--r-- | include/com/sun/star/uno/Any.h | 2 | ||||
-rw-r--r-- | include/com/sun/star/uno/Reference.h | 2 | ||||
-rw-r--r-- | include/com/sun/star/uno/Sequence.h | 2 | ||||
-rw-r--r-- | include/com/sun/star/uno/Type.h | 2 | ||||
-rw-r--r-- | include/registry/regtype.h | 6 | ||||
-rw-r--r-- | include/rtl/alloc.h | 2 | ||||
-rw-r--r-- | include/rtl/string.hxx | 2 | ||||
-rw-r--r-- | include/rtl/unload.h | 2 | ||||
-rw-r--r-- | include/rtl/ustring.h | 2 | ||||
-rw-r--r-- | include/rtl/ustring.hxx | 2 | ||||
-rw-r--r-- | include/sfx2/childwin.hxx | 8 | ||||
-rw-r--r-- | include/tools/ref.hxx | 2 | ||||
-rw-r--r-- | include/typelib/typedescription.h | 6 | ||||
-rw-r--r-- | include/uno/any2.h | 2 | ||||
-rw-r--r-- | include/uno/dispatcher.h | 2 | ||||
-rw-r--r-- | include/uno/environment.h | 4 | ||||
-rw-r--r-- | include/uno/mapping.h | 2 |
17 files changed, 27 insertions, 23 deletions
diff --git a/include/com/sun/star/uno/Any.h b/include/com/sun/star/uno/Any.h index 2f44d741bcd2..ea69ec7e696d 100644 --- a/include/com/sun/star/uno/Any.h +++ b/include/com/sun/star/uno/Any.h @@ -46,7 +46,7 @@ class Type; return true if the any contains an assignable value (no data loss), e.g. the any contains a short and you >>= it into a long variable. */ -class SAL_WARN_UNUSED Any : public uno_Any +class SAL_WARN_UNUSED SAL_DLLPUBLIC_RTTI Any : public uno_Any { public: /// @cond INTERNAL diff --git a/include/com/sun/star/uno/Reference.h b/include/com/sun/star/uno/Reference.h index 47a5c171e2d1..91db7f59cb65 100644 --- a/include/com/sun/star/uno/Reference.h +++ b/include/com/sun/star/uno/Reference.h @@ -213,7 +213,7 @@ template< typename T2 > struct UpCast< XInterface, T2 > {}; for reference type. */ template< class interface_type > -class Reference : public BaseReference +class SAL_DLLPUBLIC_RTTI Reference : public BaseReference { /** Queries given interface for type interface_type. diff --git a/include/com/sun/star/uno/Sequence.h b/include/com/sun/star/uno/Sequence.h index 21e3e9df6156..b52894ddbc32 100644 --- a/include/com/sun/star/uno/Sequence.h +++ b/include/com/sun/star/uno/Sequence.h @@ -52,7 +52,7 @@ namespace uno @tparam E element type of sequence */ template< class E > -class SAL_WARN_UNUSED Sequence +class SAL_WARN_UNUSED SAL_DLLPUBLIC_RTTI Sequence { /** sequence handle */ diff --git a/include/com/sun/star/uno/Type.h b/include/com/sun/star/uno/Type.h index 45a866013747..c1d0590482ef 100644 --- a/include/com/sun/star/uno/Type.h +++ b/include/com/sun/star/uno/Type.h @@ -51,7 +51,7 @@ enum UnoType_NoAcquire @see typelib_TypeDescriptionReference */ -class SAL_WARN_UNUSED Type +class SAL_WARN_UNUSED SAL_DLLPUBLIC_RTTI Type { /** the C typelib reference pointer */ diff --git a/include/registry/regtype.h b/include/registry/regtype.h index b08db8137852..79c3d993537d 100644 --- a/include/registry/regtype.h +++ b/include/registry/regtype.h @@ -50,7 +50,7 @@ typedef sal_uInt16 RegAccessMode; a value and link keys which navigate over the linktarget to an existing other key (which are no longer supported). */ -enum RegKeyType +enum SAL_DLLPUBLIC_RTTI RegKeyType { /// represents a real key RG_KEYTYPE, @@ -66,7 +66,7 @@ enum RegKeyType to define own data structures and store these types in the registry. The UNO core reflection data is stored as a binary blob in the type registry. */ -enum RegValueType +enum SAL_DLLPUBLIC_RTTI RegValueType { /// The key has no value or the value type is unknown. RG_VALUETYPE_NOT_DEFINED, @@ -87,7 +87,7 @@ enum RegValueType }; /// specifies the possible error codes which can occur using the registry API. -enum RegError +enum SAL_DLLPUBLIC_RTTI RegError { /// no error. REG_NO_ERROR, diff --git a/include/rtl/alloc.h b/include/rtl/alloc.h index 6a804928669c..835db155ac44 100644 --- a/include/rtl/alloc.h +++ b/include/rtl/alloc.h @@ -131,7 +131,7 @@ SAL_DLLPUBLIC void SAL_CALL rtl_freeAlignedMemory ( /** Opaque rtl_arena_type. */ -typedef struct rtl_arena_st rtl_arena_type; +typedef struct SAL_DLLPUBLIC_RTTI rtl_arena_st rtl_arena_type; #define RTL_ARENA_NAME_LENGTH 31 diff --git a/include/rtl/string.hxx b/include/rtl/string.hxx index b3a89fc52c3f..94dad50bc3b4 100644 --- a/include/rtl/string.hxx +++ b/include/rtl/string.hxx @@ -85,7 +85,7 @@ namespace rtl use this class. */ -class SAL_WARN_UNUSED OString +class SAL_WARN_UNUSED SAL_DLLPUBLIC_RTTI OString { public: /// @cond INTERNAL diff --git a/include/rtl/unload.h b/include/rtl/unload.h index f29a7543de96..53a5df18f515 100644 --- a/include/rtl/unload.h +++ b/include/rtl/unload.h @@ -39,7 +39,7 @@ extern "C" @deprecated Do not use. */ -typedef struct _rtl_ModuleCount +typedef struct SAL_DLLPUBLIC_RTTI _rtl_ModuleCount { void ( SAL_CALL * acquire ) ( struct _rtl_ModuleCount * that ); void ( SAL_CALL * release ) ( struct _rtl_ModuleCount * that ); diff --git a/include/rtl/ustring.h b/include/rtl/ustring.h index 80c6bccf7f3d..8dd70cb4911f 100644 --- a/include/rtl/ustring.h +++ b/include/rtl/ustring.h @@ -1173,7 +1173,7 @@ SAL_DLLPUBLIC double SAL_CALL rtl_ustr_toDouble( /** @cond INTERNAL */ /** The implementation of a Unicode string. */ -typedef struct _rtl_uString +typedef struct SAL_DLLPUBLIC_RTTI _rtl_uString { oslInterlockedCount refCount; /* opaque */ sal_Int32 length; diff --git a/include/rtl/ustring.hxx b/include/rtl/ustring.hxx index 418892670596..78a6b60f1c17 100644 --- a/include/rtl/ustring.hxx +++ b/include/rtl/ustring.hxx @@ -111,7 +111,7 @@ template<char C> struct SAL_WARN_UNUSED OUStringLiteral1 { less people should have understanding problems when they use this class. */ -class SAL_WARN_UNUSED OUString +class SAL_WARN_UNUSED SAL_DLLPUBLIC_RTTI OUString { public: /// @cond INTERNAL diff --git a/include/sfx2/childwin.hxx b/include/sfx2/childwin.hxx index d4a8efbcc494..a768e82cf919 100644 --- a/include/sfx2/childwin.hxx +++ b/include/sfx2/childwin.hxx @@ -20,6 +20,7 @@ #define INCLUDED_SFX2_CHILDWIN_HXX #include <sal/config.h> + #include <sfx2/dllapi.h> #include <sal/types.h> #include <vcl/window.hxx> @@ -28,9 +29,12 @@ #include <sfx2/shell.hxx> #include <sfx2/chalign.hxx> +#include <sfx2/bindings.hxx> + // complete SfxBindings for complete SfxChildWinCtor, SfxChildWinContextCtor + // under -fsanitize=function + class SfxWorkWindow; class SfxModule; -class SfxBindings; class SfxShell; class SfxChildWindow; class SfxChildWindowContext; @@ -45,7 +49,7 @@ class SfxChildWindowContext; #define CHILDWIN_NOPOS USHRT_MAX // ChildWindow Configuration -struct SfxChildWinInfo +struct SAL_DLLPUBLIC_RTTI SfxChildWinInfo { bool bVisible; Point aPos; diff --git a/include/tools/ref.hxx b/include/tools/ref.hxx index aecc2b379e00..a2cba5088fad 100644 --- a/include/tools/ref.hxx +++ b/include/tools/ref.hxx @@ -33,7 +33,7 @@ namespace tools { /** T must be a class that extends SvRefBase */ -template<typename T> class SvRef { +template<typename T> class SAL_DLLPUBLIC_RTTI SvRef { public: SvRef(): pObj(0) {} diff --git a/include/typelib/typedescription.h b/include/typelib/typedescription.h index 2b7314f20b6f..8ed5ce068e58 100644 --- a/include/typelib/typedescription.h +++ b/include/typelib/typedescription.h @@ -37,7 +37,7 @@ struct _typelib_TypeDescription; /** Holds a weak reference to a type description. */ -typedef struct _typelib_TypeDescriptionReference +typedef struct SAL_DLLPUBLIC_RTTI _typelib_TypeDescriptionReference { /** reference count of type; don't ever modify this by yourself, use typelib_typedescriptionreference_acquire() and typelib_typedescriptionreference_release() @@ -68,7 +68,7 @@ typedef struct _typelib_TypeDescriptionReference typelib_TypeDescriptionReference for the first six members. So a typedescription can be used as type reference. */ -typedef struct _typelib_TypeDescription +typedef struct SAL_DLLPUBLIC_RTTI _typelib_TypeDescription { /** reference count; don't ever modify this by yourself, use typelib_typedescription_acquire() and typelib_typedescription_release() @@ -367,7 +367,7 @@ typedef struct _typelib_InterfaceAttributeTypeDescription <code>typelib_typedescription_complete</code>.</li> </ul> */ -typedef struct _typelib_InterfaceTypeDescription +typedef struct SAL_DLLPUBLIC_RTTI _typelib_InterfaceTypeDescription { /** inherits all members of typelib_TypeDescription */ diff --git a/include/uno/any2.h b/include/uno/any2.h index 49a0d35e4c8b..556476dd5d89 100644 --- a/include/uno/any2.h +++ b/include/uno/any2.h @@ -37,7 +37,7 @@ struct _uno_Mapping; /** This is the binary specification of an UNO any. */ -typedef struct _uno_Any +typedef struct SAL_DLLPUBLIC_RTTI _uno_Any { /** type of value */ diff --git a/include/uno/dispatcher.h b/include/uno/dispatcher.h index 71d1563db09a..d4bde04d077e 100644 --- a/include/uno/dispatcher.h +++ b/include/uno/dispatcher.h @@ -58,7 +58,7 @@ typedef void (SAL_CALL * uno_DispatchMethod)( /** The binary C uno interface description. */ -typedef struct _uno_Interface +typedef struct SAL_DLLPUBLIC_RTTI _uno_Interface { /** Acquires uno interface. diff --git a/include/uno/environment.h b/include/uno/environment.h index f9ab4e68cae9..d0051227ac69 100644 --- a/include/uno/environment.h +++ b/include/uno/environment.h @@ -38,7 +38,7 @@ struct _typelib_InterfaceTypeDescription; /** The binary specification of an UNO environment. */ -typedef struct _uno_Environment +typedef struct SAL_DLLPUBLIC_RTTI _uno_Environment { /** reserved for future use (0 if not used) */ @@ -130,7 +130,7 @@ typedef void * (SAL_CALL * uno_memAlloc)( sal_Size nBytes ); /** The binary specification of an UNO environment supporting interface registration. */ -typedef struct _uno_ExtEnvironment +typedef struct SAL_DLLPUBLIC_RTTI _uno_ExtEnvironment { /** inherits all members of an uno_Environment */ diff --git a/include/uno/mapping.h b/include/uno/mapping.h index 7673514e0a2d..5a55fbf68b45 100644 --- a/include/uno/mapping.h +++ b/include/uno/mapping.h @@ -61,7 +61,7 @@ typedef void (SAL_CALL * uno_MapInterfaceFunc)( /** This is the binary specification of a mapping. */ -typedef struct _uno_Mapping +typedef struct SAL_DLLPUBLIC_RTTI _uno_Mapping { /** Acquires mapping */ |