bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx | 6 configure.ac | 44 +-- embedserv/source/embed/syswinwrapper.cxx | 8 embedserv/source/inc/embeddocaccess.hxx | 8 embedserv/source/inc/stdafx.h | 16 + embedserv/source/inc/syswinwrapper.hxx | 4 extensions/source/activex/SOActiveX.h | 9 extensions/source/activex/StdAfx2.h | 16 + extensions/source/activex/so_activex.cxx | 9 external/boost/clang-cl.patch.0 | 183 +++++++++++++++- external/clucene/patches/clucene-warnings.patch | 20 - external/glm/UnpackedTarball_glm.mk | 1 external/glm/clang-cl.patch.0 | 32 ++ external/icu/UnpackedTarball_icu.mk | 1 external/icu/clang-cl.patch.0 | 26 ++ external/liborcus/Library_orcus-parser.mk | 7 external/nss/UnpackedTarball_nss.mk | 1 external/nss/clang-cl.patch.0 | 56 ++++ external/poppler/ExternalProject_poppler.mk | 2 fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx | 1 fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx | 12 - sal/Library_sal.mk | 4 sal/cpprt/operators_new_delete.cxx | 10 sc/inc/lookupcache.hxx | 8 solenv/gbuild/platform/com_MSC_defs.mk | 6 solenv/gcc-wrappers/wrapper.cxx | 21 + 26 files changed, 442 insertions(+), 69 deletions(-)
New commits: commit 06e32106cc4c0886c228b4dbfe7301222a96a231 Author: Stephan Bergmann <sberg...@redhat.com> Date: Tue Dec 1 16:23:16 2015 +0100 Avoid clang-cl -Werror,-Wbitfield-constant-conversion ...when (non-negative) QueryOp enumerators LESS/GREATER_EQUAL are crammed into a 2-bit meOp bitfield, where enums are implictly signed for MSVC, so the values actually storable in the bitfield range from -2 to +1. The clang-cl warning would go away when fixing the underlying type of QueryOp as unsigned, but then GCC would start to emit "error: âScLookupCache::QueryCriteria::meOpâ is too small to hold all values of âenum ScLookupCache::QueryOpâ [-Werror]." So don't bother with bitfields at all: For QueryCritera, for one there's a union member with a double and a pointer, so sizeof (QueryCriteria) will be twice the size of double anyway; and for another, MSVC doesn't combine bitfields of different type, so the bool members were separated from meOp anyway. For QueryKey the reason for a bitfield is even less clear cut, and it might only have been there so that comparing (negative!) values read out of QueryCritera::meOp compare equal to values read out of QueryKey::meOp under MSVC. Change-Id: I69fb068bea914c00a29001155218cb9f1b8f8a9a diff --git a/sc/inc/lookupcache.hxx b/sc/inc/lookupcache.hxx index 4675f0d..9412de3 100644 --- a/sc/inc/lookupcache.hxx +++ b/sc/inc/lookupcache.hxx @@ -64,9 +64,9 @@ public: double mfVal; const OUString *mpStr; }; - bool mbAlloc : 1; - bool mbString : 1; - QueryOp meOp : 2; + bool mbAlloc; + bool mbString; + QueryOp meOp; void deleteString() { @@ -145,7 +145,7 @@ private: { SCROW mnRow; SCTAB mnTab; - QueryOp meOp : 2; + QueryOp meOp; QueryKey( const ScAddress & rAddress, const QueryOp eOp ) : mnRow( rAddress.Row()), commit fea70bfb0624e4aa57bb8e4f1c229188b061f5d2 Author: Stephan Bergmann <sberg...@redhat.com> Date: Tue Dec 1 13:02:14 2015 +0100 external/icu: Work around a weird Windows bug in either make or clang-cl ...for now; workdir/UnpackedTarball/icu/source/tools/toolutil/Makefile invokes the compiler with a -DU_HOST=\"...\" argument, and apparently directly executes the compiler from CreateProcess, not going via a shell invocation for the recipe line. This confuses clang-cl for whatever reason, and for whatever other reason, forcing make to go via a shell invocation (by adding "true &&" into the recipe line) fixes it. Change-Id: I3757a8856f93228c19475b37f3037fa9519a426f diff --git a/external/icu/clang-cl.patch.0 b/external/icu/clang-cl.patch.0 index cef630c..4df5d0f 100644 --- a/external/icu/clang-cl.patch.0 +++ b/external/icu/clang-cl.patch.0 @@ -1,3 +1,16 @@ +--- source/config/mh-cygwin-msvc ++++ source/config/mh-cygwin-msvc +@@ -51,8 +51,8 @@ + LDFLAGS+=-nologo + + # Commands to compile +-COMPILE.c= $(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) -c ++COMPILE.c= true && $(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) -c +-COMPILE.cc= $(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) -c ++COMPILE.cc= true && $(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) -c + + # Commands to link + LINK.c= LINK.EXE -subsystem:console $(LDFLAGS) --- source/runConfigureICU +++ source/runConfigureICU @@ -259,8 +259,8 @@ commit 97c8458b43abb9269866221f51db9d24de4a5380 Author: Stephan Bergmann <sberg...@redhat.com> Date: Tue Dec 1 12:57:41 2015 +0100 boost/external: More fixes for clang-cl * Avoid errors about (somewhat different, but apparently in a way that MSVC doesn't care) redeclarations of system header stuff (and working around that with BOOST_USE_WINDOWS_H would lead to other problems). * Need the workaround for broken MSVC 2010 STL iterator taxonomy for clang-cl, too. Change-Id: I4f9c9b5cc8a19856cc409450aac1fb1baa5554c9 diff --git a/external/boost/clang-cl.patch.0 b/external/boost/clang-cl.patch.0 index 6713dc0..71bf2d8 100644 --- a/external/boost/clang-cl.patch.0 +++ b/external/boost/clang-cl.patch.0 @@ -52,6 +52,105 @@ #ifndef BOOST_COMPILER # define BOOST_COMPILER "Clang version " __clang_version__ +--- boost/date_time/filetime_functions.hpp ++++ boost/date_time/filetime_functions.hpp +@@ -27,6 +27,16 @@ + #include <boost/date_time/time.hpp> + #include <boost/date_time/date_defs.hpp> + ++#if !defined(BOOST_USE_WINDOWS_H) ++extern "C" { ++ struct _FILETIME; // Windows Kits/8.1/Include/shared/minwindef.h ++ struct _SYSTEMTIME; // Windows Kits/8.1/Include/um/minwinbase.h ++ __declspec(dllimport) void __stdcall GetSystemTimeAsFileTime(_FILETIME* lpFileTime); ++ __declspec(dllimport) int __stdcall FileTimeToLocalFileTime(const _FILETIME* lpFileTime, _FILETIME* lpLocalFileTime); ++ __declspec(dllimport) void __stdcall GetSystemTime(_SYSTEMTIME* lpSystemTime); ++ __declspec(dllimport) int __stdcall SystemTimeToFileTime(const _SYSTEMTIME* lpSystemTime, _FILETIME* lpFileTime); ++} ++#endif + namespace boost { + + namespace date_time { +@@ -54,10 +64,6 @@ + boost::uint16_t wMilliseconds; + }; + +- __declspec(dllimport) void __stdcall GetSystemTimeAsFileTime(FILETIME* lpFileTime); +- __declspec(dllimport) int __stdcall FileTimeToLocalFileTime(const FILETIME* lpFileTime, FILETIME* lpLocalFileTime); +- __declspec(dllimport) void __stdcall GetSystemTime(SYSTEMTIME* lpSystemTime); +- __declspec(dllimport) int __stdcall SystemTimeToFileTime(const SYSTEMTIME* lpSystemTime, FILETIME* lpFileTime); + + } // extern "C" + +@@ -74,7 +80,7 @@ + GetSystemTimeAsFileTime(&ft_utc); + FileTimeToLocalFileTime(&ft_utc, &ft); + #elif defined(BOOST_HAS_GETSYSTEMTIMEASFILETIME) +- GetSystemTimeAsFileTime(&ft); ++ GetSystemTimeAsFileTime(reinterpret_cast<::_FILETIME *>(&ft)); + #else + system_time st; + GetSystemTime(&st); +--- boost/detail/winapi/timers.hpp ++++ boost/detail/winapi/timers.hpp +@@ -15,6 +15,11 @@ + #pragma once + #endif + ++#if !defined(BOOST_USE_WINDOWS_H) ++extern "C" { ++ union _LARGE_INTEGER; // Windows Kits/8.1/Include/um/winnt.h ++} ++#endif + namespace boost + { + namespace detail +@@ -28,12 +33,12 @@ + extern "C" { + __declspec(dllimport) BOOL_ WINAPI + QueryPerformanceCounter( +- LARGE_INTEGER_ *lpPerformanceCount ++ ::_LARGE_INTEGER *lpPerformanceCount + ); + + __declspec(dllimport) BOOL_ WINAPI + QueryPerformanceFrequency( +- LARGE_INTEGER_ *lpFrequency ++ ::_LARGE_INTEGER *lpFrequency + ); + } + #endif +--- boost/multi_array/base.hpp ++++ boost/multi_array/base.hpp +@@ -222,7 +222,7 @@ + // MSVC 2010 is broken in debug mode: it requires + // that an Output Iterator have output_iterator_tag in its iterator_category if + // that iterator is not bidirectional_iterator or random_access_iterator. +-#if BOOST_WORKAROUND(BOOST_MSVC, >= 1600) ++#if BOOST_WORKAROUND(BOOST_MSVC, >= 1600) || (defined __clang__ && BOOST_WORKAROUND(_MSC_VER, >= 1600)) + struct mutable_iterator_tag + : boost::random_access_traversal_tag, std::input_iterator_tag + { +@@ -274,7 +274,7 @@ + // + // iterator support + // +-#if BOOST_WORKAROUND(BOOST_MSVC, >= 1600) ++#if BOOST_WORKAROUND(BOOST_MSVC, >= 1600) || (defined __clang__ && BOOST_WORKAROUND(_MSC_VER, >= 1600)) + // Deal with VC 2010 output_iterator_tag requirement + typedef array_iterator<T,T*,mpl::size_t<NumDims>,reference, + mutable_iterator_tag> iterator; +--- boost/multi_array/iterator.hpp ++++ boost/multi_array/iterator.hpp +@@ -60,7 +60,7 @@ + , private + value_accessor_generator<T,NumDims>::type + { +- friend class iterator_core_access; ++ friend class boost::iterators::iterator_core_access; + typedef detail::multi_array::associated_types<T,NumDims> access_t; + + typedef iterator_facade< # workdir/UnpackedTarball/boost\boost/smart_ptr/detail/sp_counted_base_clang.hpp(29,1) : error: cannot mangle this C11 atomic type yet # inline void atomic_increment( atomic_int_least32_t * pw ) @@ -68,7 +167,25 @@ # endif #endif -# C:/lo64/core/workdir/UnpackedTarball/boost/libs/thread/src/win32/thread.cpp(1006,36) : error: dllimport cannot be applied to non-inline function definition +# workdir/UnpackedTarball/boost\boost/smart_ptr/detail/yield_k.hpp(63,29) : error: 'Sleep' redeclared without 'dllimport' attribute: previous 'dll# import' ignored [-Werror,-Winconsistent-dllimport] +# extern "C" void __stdcall Sleep( unsigned long ms ); +# ^ +# C:/PROGRA~2/WI3CF2~1/8.1/include/um\synchapi.h(908,1) : note: previous declaration is here +# Sleep( +# ^ +--- boost/smart_ptr/detail/yield_k.hpp ++++ boost/smart_ptr/detail/yield_k.hpp +@@ -60,7 +60,7 @@ + { + + #if !defined( BOOST_USE_WINDOWS_H ) && !BOOST_PLAT_WINDOWS_RUNTIME +- extern "C" void __stdcall Sleep( unsigned long ms ); ++ extern "C" __declspec(dllimport) void __stdcall Sleep( unsigned long ms ); + #endif + + inline void yield( unsigned k ) + +# workdir/UnpackedTarball/boost/libs/thread/src/win32/thread.cpp(1006,36) : error: dllimport cannot be applied to non-inline function definition # BOOST_THREAD_DECL void __cdecl on_process_enter() # ^ --- boost/thread/detail/config.hpp @@ -82,3 +199,25 @@ //For compilers supporting auto-tss cleanup //with Boost.Threads lib, use Boost.Threads lib # define BOOST_THREAD_USE_LIB +--- boost/typeof/typeof.hpp ++++ boost/typeof/typeof.hpp +@@ -49,7 +49,7 @@ + # endif + # endif + +-#elif defined(__GNUC__) ++#elif defined(__GNUC__) || defined __clang__ + # ifndef BOOST_TYPEOF_EMULATION + # ifndef BOOST_TYPEOF_NATIVE + # define BOOST_TYPEOF_NATIVE +--- boost/uuid/seed_rng.hpp ++++ boost/uuid/seed_rng.hpp +@@ -175,7 +175,7 @@ + + boost::detail::winapi::LARGE_INTEGER_ ts; + ts.QuadPart = 0; +- boost::detail::winapi::QueryPerformanceCounter( &ts ); ++ boost::detail::winapi::QueryPerformanceCounter( reinterpret_cast<::_LARGE_INTEGER *>(&ts) ); + sha.process_bytes( (unsigned char const*)&ts, sizeof( ts ) ); + + std::time_t tm = std::time( 0 ); commit 0c70c7d3df63fe88015c992a088c06c590185fcd Author: Stephan Bergmann <sberg...@redhat.com> Date: Tue Dec 1 12:56:04 2015 +0100 external/boost: Work around -Werror,-Winvalid-constexpr Change-Id: I819be5efb25632d26fe49a71dbc07fe16e4914b1 diff --git a/external/boost/clang-cl.patch.0 b/external/boost/clang-cl.patch.0 index 0dd44d4..6713dc0 100644 --- a/external/boost/clang-cl.patch.0 +++ b/external/boost/clang-cl.patch.0 @@ -1,3 +1,45 @@ +# clang-cl supports constexpr, so BOOST_CHRONO_LIB_CONSTEXPR expands to +# "constexpr", but MSVC's std::numeric_limits<>::max() isn't marked as +# constexpr, so clang-cl issues -Winvalid-constexpr: +--- boost/chrono/duration.hpp ++++ boost/chrono/duration.hpp +@@ -348,29 +348,36 @@ + static BOOST_CHRONO_LIB_CONSTEXPR T lowest() BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW {return (std::numeric_limits<T>::min) ();} + }; + ++#if defined _MSC_VER && defined __clang__ ++#pragma clang diagnostic push ++#pragma clang diagnostic ignored "-Winvalid-constexpr" ++#endif + template <> + struct chrono_numeric_limits<float,true> { + static BOOST_CHRONO_LIB_CONSTEXPR float lowest() BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW + { + return -(std::numeric_limits<float>::max) (); + } + }; + + template <> + struct chrono_numeric_limits<double,true> { + static BOOST_CHRONO_LIB_CONSTEXPR double lowest() BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW + { + return -(std::numeric_limits<double>::max) (); + } + }; + + template <> + struct chrono_numeric_limits<long double,true> { + static BOOST_CHRONO_LIB_CONSTEXPR long double lowest() BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW + { + return -(std::numeric_limits<long double>::max)(); + } + }; ++#if defined _MSC_VER && defined __clang__ ++#pragma clang diagnostic pop ++#endif + + template <class T> + struct numeric_limits : chrono_numeric_limits<typename remove_cv<T>::type> --- boost/config/compiler/clang.hpp +++ boost/config/compiler/clang.hpp @@ -260,9 +260,7 @@ commit 5d7e556e478a5a301fd046c893542dabef36d82c Author: Stephan Bergmann <sberg...@redhat.com> Date: Tue Dec 1 12:48:38 2015 +0100 external/clucene: Use warning-supression pragmas for clang-cl, too Change-Id: I23da54974f39da5fccb619d6fa68eff38e70f5a5 diff --git a/external/clucene/patches/clucene-warnings.patch b/external/clucene/patches/clucene-warnings.patch index 981215f..fc3e322 100644 --- a/external/clucene/patches/clucene-warnings.patch +++ b/external/clucene/patches/clucene-warnings.patch @@ -4,7 +4,7 @@ #ifndef _lucene_analysis_AnalysisHeader_ #define _lucene_analysis_AnalysisHeader_ -+#if defined(__GNUC__) ++#if defined(__GNUC__) || defined __clang__ +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Woverloaded-virtual" +#endif @@ -17,7 +17,7 @@ CL_NS_END + -+#if defined(__GNUC__) ++#if defined(__GNUC__) || defined __clang__ +# pragma GCC diagnostic pop +#endif #endif @@ -27,7 +27,7 @@ #ifndef _lucene_search_Searcher_ #define _lucene_search_Searcher_ -+#if defined(__GNUC__) ++#if defined(__GNUC__) || defined __clang__ +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Woverloaded-virtual" +#endif @@ -40,7 +40,7 @@ CL_NS_END + -+#if defined(__GNUC__) ++#if defined(__GNUC__) || defined __clang__ +# pragma GCC diagnostic pop +#endif #endif @@ -50,7 +50,7 @@ #ifndef _lucene_store_IndexInput_ #define _lucene_store_IndexInput_ -+#if defined(__GNUC__) ++#if defined(__GNUC__) || defined __clang__ +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Woverloaded-virtual" +#endif @@ -63,7 +63,7 @@ }; CL_NS_END + -+#if defined(__GNUC__) ++#if defined(__GNUC__) || defined __clang__ +# pragma GCC diagnostic pop +#endif #endif @@ -73,7 +73,7 @@ #ifndef _lucene_util_Array_ #define _lucene_util_Array_ -+#if defined(__GNUC__) ++#if defined(__GNUC__) || defined __clang__ +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wshadow" +# pragma GCC diagnostic ignored "-Wunused-parameter" @@ -87,7 +87,7 @@ CL_NS_END + -+#if defined(__GNUC__) ++#if defined(__GNUC__) || defined __clang__ +# pragma GCC diagnostic pop +#endif #endif @@ -97,7 +97,7 @@ #ifndef _lucene_util_PriorityQueue_ #define _lucene_util_PriorityQueue_ -+#if defined(__GNUC__) ++#if defined(__GNUC__) || defined __clang__ +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wshadow" +#endif @@ -110,7 +110,7 @@ CL_NS_END + -+#if defined(__GNUC__) ++#if defined(__GNUC__) || defined __clang__ +# pragma GCC diagnostic pop +#endif #endif commit d691bf7d6501c89c3178aacc5772ac3fdc8b3c4c Author: Stephan Bergmann <sberg...@redhat.com> Date: Tue Dec 1 12:43:57 2015 +0100 external/glm: Fix check for availability of C++11 static_assert Change-Id: I0d24bcdfeb0d004607569da089c9f787a868da72 diff --git a/external/glm/clang-cl.patch.0 b/external/glm/clang-cl.patch.0 index 9e3afc9..edbc30b 100644 --- a/external/glm/clang-cl.patch.0 +++ b/external/glm/clang-cl.patch.0 @@ -12,3 +12,21 @@ #endif//(GLM_COMPILER & GLM_COMPILER_VC) #endif//(GLM_ARCH != GLM_ARCH_PURE) + +# Fix check for availability of C++11 static_assert (it apparently should be +# conditional on GLM_LANG_CXX11 instead of GLM_LANG_CXX0X, but just don't care +# to try to fix that mess, and use __cplusplus value instead; unconditionally +# using C++11 static_assert would fail in external/libgltf, which uses +# external/glm but does not -std=c++11); falling back to BOOST_STATIC_ASSERT +# would cause unnecessary warnings with clang-cl: +--- glm/core/setup.hpp ++++ glm/core/setup.hpp +@@ -628,7 +628,7 @@ + /////////////////////////////////////////////////////////////////////////////////////////////////// + // Static assert + +-#if(GLM_LANG == GLM_LANG_CXX0X) ++#if __cplusplus >= 201103L + # define GLM_STATIC_ASSERT(x, message) static_assert(x, message) + #elif(defined(BOOST_STATIC_ASSERT)) + # define GLM_STATIC_ASSERT(x, message) BOOST_STATIC_ASSERT(x) commit 7ae1c3520a607ee7b542b5eeaae3d1d0a7e6f362 Author: Stephan Bergmann <sberg...@redhat.com> Date: Tue Dec 1 12:38:14 2015 +0100 external/glm: work around missing clang-cl #pragma support Change-Id: I596dc0e2306e7170e65c77a1635f88407272e6b1 diff --git a/external/glm/UnpackedTarball_glm.mk b/external/glm/UnpackedTarball_glm.mk index f593254..71f1c3c 100644 --- a/external/glm/UnpackedTarball_glm.mk +++ b/external/glm/UnpackedTarball_glm.mk @@ -19,6 +19,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,glm, \ external/glm/Wshadow-patch-fix.patch \ external/glm/Wsign-compare.patch.0 \ external/glm/Wunused-parameter.patch \ + external/glm/clang-cl.patch.0 \ )) # vim: set noet sw=4 ts=4: diff --git a/external/glm/clang-cl.patch.0 b/external/glm/clang-cl.patch.0 new file mode 100644 index 0000000..9e3afc9 --- /dev/null +++ b/external/glm/clang-cl.patch.0 @@ -0,0 +1,14 @@ +# "#pragma intrinsic" not (yet?) handled in the "if (LangOpts.MicrosoftExt)" +# block in Preprocessor::RegisterBuiltinPragmas in Clang's lib/Lex/Pragma.cpp: +--- glm/core/func_integer.inl ++++ glm/core/func_integer.inl +@@ -29,7 +29,9 @@ + #if(GLM_ARCH != GLM_ARCH_PURE) + #if(GLM_COMPILER & GLM_COMPILER_VC) + # include <intrin.h> ++#if !defined __clang__ + # pragma intrinsic(_BitScanReverse) ++#endif + #endif//(GLM_COMPILER & GLM_COMPILER_VC) + #endif//(GLM_ARCH != GLM_ARCH_PURE) + commit abe87fdfe766a9ec0ab9a5b844bc7a400cfe5b2f Author: Stephan Bergmann <sberg...@redhat.com> Date: Tue Dec 1 12:24:41 2015 +0100 external/icu: Don't hardcode cl (so we can build with clang-cl instead) Change-Id: I8e75b0ab2439592316fc0d871280a438e3ae2f1c diff --git a/external/icu/UnpackedTarball_icu.mk b/external/icu/UnpackedTarball_icu.mk index ad28fce..c48d025 100644 --- a/external/icu/UnpackedTarball_icu.mk +++ b/external/icu/UnpackedTarball_icu.mk @@ -24,6 +24,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,icu,\ external/icu/icu4c-icu11100.patch.1 \ external/icu/icu4c-scriptrun.patch \ external/icu/rtti.patch.0 \ + external/icu/clang-cl.patch.0 \ $(if $(filter-out ANDROID,$(OS)),external/icu/icu4c-icudata-stdlibs.diff) \ $(if $(filter EMSCRIPTEN,$(OS)),external/icu/icu4c-emscripten.patch.1) \ )) diff --git a/external/icu/clang-cl.patch.0 b/external/icu/clang-cl.patch.0 new file mode 100644 index 0000000..cef630c --- /dev/null +++ b/external/icu/clang-cl.patch.0 @@ -0,0 +1,13 @@ +--- source/runConfigureICU ++++ source/runConfigureICU +@@ -259,8 +259,8 @@ + Cygwin/MSVC) + THE_OS="Windows with Cygwin" + THE_COMP="Microsoft Visual C++" +- CC=cl; export CC +- CXX=cl; export CXX ++ CC=${CC-cl}; export CC ++ CXX=${CXX-cl}; export CXX + RELEASE_CFLAGS='-Gy -MD' + RELEASE_CXXFLAGS='-Gy -MD' + DEBUG_CFLAGS='-Zi -MDd' commit be0bf120299cff1ec14af1b578d4ea89976cea08 Author: Stephan Bergmann <sberg...@redhat.com> Date: Tue Dec 1 11:51:23 2015 +0100 external/liborcus: Silence clang-cl errors about redeclared Windows functions ...like CreateMutexA redeclared in workdir/UnpackedTarball/boost\boost/thread/win32/thread_primitives.hpp. As such problematic Boost include files are apparently not included from LO-proper source files, only from external, it looks easiest to just silence that with BOOST_USE_WINDOWS_H here. Change-Id: Ia5ec2325934e6d7fdcf91e6faa2e671aee2091ae diff --git a/external/liborcus/Library_orcus-parser.mk b/external/liborcus/Library_orcus-parser.mk index c3b4eec..50c7f72 100644 --- a/external/liborcus/Library_orcus-parser.mk +++ b/external/liborcus/Library_orcus-parser.mk @@ -29,6 +29,13 @@ $(eval $(call gb_Library_add_defs,orcus-parser,\ -DBOOST_ALL_NO_LIB \ -D__ORCUS_PSR_BUILDING_DLL \ )) +ifeq ($(OS),WNT) +ifeq ($(COM_IS_CLANG),TRUE) +$(eval $(call gb_Library_add_defs,orcus-parser, \ + -DBOOST_USE_WINDOWS_H \ +)) +endif +endif $(eval $(call gb_Library_set_generated_cxx_suffix,orcus-parser,cpp)) commit 3aa5f100eb1402bea7896524f0f04dabdca65af7 Author: Stephan Bergmann <sberg...@redhat.com> Date: Tue Dec 1 11:47:24 2015 +0100 external/nss: work around missing clang-cl #pragma support Change-Id: I068ff0ef2252409689c0c376ec41bdd97b4567cc diff --git a/external/nss/UnpackedTarball_nss.mk b/external/nss/UnpackedTarball_nss.mk index 4afd275..38acfed 100644 --- a/external/nss/UnpackedTarball_nss.mk +++ b/external/nss/UnpackedTarball_nss.mk @@ -23,6 +23,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,nss,\ external/nss/nss-3.13.3-build.patch.3 \ external/nss/nss.mingw.patch.3) \ external/nss/ubsan.patch.0 \ + external/nss/clang-cl.patch.0 \ $(if $(filter IOS,$(OS)), \ external/nss/nss-chromium-nss-static.patch \ external/nss/nss-more-static.patch \ diff --git a/external/nss/clang-cl.patch.0 b/external/nss/clang-cl.patch.0 new file mode 100644 index 0000000..bc90421 --- /dev/null +++ b/external/nss/clang-cl.patch.0 @@ -0,0 +1,56 @@ +# "#pragma deprecated" and "#pragma intrinsic" not (yet?) handled in the "if +# (LangOpts.MicrosoftExt)" block in Preprocessor::RegisterBuiltinPragmas in +# Clang's lib/Lex/Pragma.cpp: +--- nspr/pr/include/pratom.h ++++ nspr/pr/include/pratom.h +@@ -83,7 +83,7 @@ + + #include <intrin.h> + +-#ifdef _MSC_VER ++#if defined _WIN32 && !defined __clang__ + #pragma intrinsic(_InterlockedIncrement) + #pragma intrinsic(_InterlockedDecrement) + #pragma intrinsic(_InterlockedExchange) +--- nspr/pr/include/prbit.h ++++ nspr/pr/include/prbit.h +@@ -14,7 +14,7 @@ + ** functions. + */ + #if defined(_WIN32) && (_MSC_VER >= 1300) && \ +- (defined(_M_IX86) || defined(_M_AMD64) || defined(_M_ARM)) ++ (defined(_M_IX86) || defined(_M_AMD64) || defined(_M_ARM)) && !defined __clang__ + # include <intrin.h> + # pragma intrinsic(_BitScanForward,_BitScanReverse) + __forceinline static int __prBitScanForward32(unsigned int val) +@@ -136,7 +136,7 @@ + */ + + #if defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_AMD64) || \ +- defined(_M_X64) || defined(_M_ARM)) ++ defined(_M_X64) || defined(_M_ARM)) && !defined __clang__ + #include <stdlib.h> + #pragma intrinsic(_rotl, _rotr) + #define PR_ROTATE_LEFT32(a, bits) _rotl(a, bits) +--- nss/lib/certdb/certdb.h ++++ nss/lib/certdb/certdb.h +@@ -31,7 +31,7 @@ + #endif + #define CERTDB_VALID_PEER ((__CERTDB_VALID_PEER) CERTDB_TERMINAL_RECORD) + #else +-#ifdef _WIN32 ++#if defined _WIN32 && !defined __clang__ + #pragma deprecated(CERTDB_VALID_PEER) + #endif + #define CERTDB_VALID_PEER CERTDB_TERMINAL_RECORD +--- nss/lib/util/pkcs11n.h ++++ nss/lib/util/pkcs11n.h +@@ -390,7 +390,7 @@ + /* keep the old value for compatibility reasons*/ + #define CKT_NSS_MUST_VERIFY ((__CKT_NSS_MUST_VERIFY)(CKT_NSS +4)) + #else +-#ifdef _WIN32 ++#if defined _WIN32 && !defined __clang__ + /* This magic gets the windows compiler to give us a deprecation + * warning */ + #pragma deprecated(CKT_NSS_UNTRUSTED, CKT_NSS_MUST_VERIFY, CKT_NSS_VALID) commit 39a7cf0303a4a633393733d95581e24669d15155 Author: Stephan Bergmann <sberg...@redhat.com> Date: Tue Dec 1 11:41:36 2015 +0100 clang-cl needs an explicit -I to find systools/win32/snprintf.h ...included via external/poppler/poppler-snprintf.patch.1 Change-Id: Ibe20452e7da4995ca33c97dd99dc441060e73894 diff --git a/external/poppler/ExternalProject_poppler.mk b/external/poppler/ExternalProject_poppler.mk index 103f609..806a041 100644 --- a/external/poppler/ExternalProject_poppler.mk +++ b/external/poppler/ExternalProject_poppler.mk @@ -17,7 +17,7 @@ $(eval $(call gb_ExternalProject_register_targets,poppler,\ $(call gb_ExternalProject_get_state_target,poppler,build) : $(call gb_ExternalProject_run,build,\ - $(if $(filter TRUE,$(DISABLE_DYNLOADING)),CFLAGS="$(CFLAGS) $(gb_VISIBILITY_FLAGS) $(gb_COMPILEROPTFLAGS)" CXXFLAGS="$(CXXFLAGS) $(gb_VISIBILITY_FLAGS) $(gb_VISIBILITY_FLAGS_CXX) $(gb_COMPILEROPTFLAGS)") \ + $(if $(filter TRUE,$(DISABLE_DYNLOADING)),CFLAGS="$(CFLAGS) $(gb_VISIBILITY_FLAGS) $(gb_COMPILEROPTFLAGS)" CXXFLAGS="$(CXXFLAGS) $(gb_VISIBILITY_FLAGS) $(gb_VISIBILITY_FLAGS_CXX) $(gb_COMPILEROPTFLAGS)",$(if $(filter MSC-120,$(COM)-$(VCVER)),CXXFLAGS="$(CXXFLAGS) -I$(SRCDIR)/include")) \ MAKE=$(MAKE) ./configure \ --with-pic \ --enable-static \ commit 2291cadabfe2ddfeddabce7f0ae49a3e9e7ca20d Author: Stephan Bergmann <sberg...@redhat.com> Date: Tue Dec 1 11:39:04 2015 +0100 For some odd reason, clang-cl.exe doesn't like being called by CreateProcess ...with the executable specified in the first arg, instead of as part of the second arg (i.e., the command line) Change-Id: Ie6e232f6880b5bfbb91a52ee5398b91a0ccddc4d diff --git a/solenv/gcc-wrappers/wrapper.cxx b/solenv/gcc-wrappers/wrapper.cxx index 60e6159..0ed323c 100644 --- a/solenv/gcc-wrappers/wrapper.cxx +++ b/solenv/gcc-wrappers/wrapper.cxx @@ -194,18 +194,15 @@ int startprocess(string command, string args) { command=command.substr(0,pos+strlen("ccache"))+".exe"; } - if (args[0] != ' ') - { - args.insert(0, " "); // lpCommandLine *must* start with space! - } + auto cmdline = "\"" + command + "\" " + args; //cerr << "CMD= " << command << " " << args << endl; // Commandline may be modified by CreateProcess - char* cmdline=_strdup(args.c_str()); + char* cmdlineBuf=_strdup(cmdline.c_str()); - if(!CreateProcess(command.c_str(), // Process Name - cmdline, // Command Line + if(!CreateProcess(nullptr, // Process Name + cmdlineBuf, // Command Line NULL, // Process Handle not Inheritable NULL, // Thread Handle not Inheritable TRUE, // Handles are Inherited commit 895061b809e443e24896b1c851a7d4dafb045a68 Author: Stephan Bergmann <sberg...@redhat.com> Date: Tue Dec 1 11:35:40 2015 +0100 Filter out -fPIC too ...which happens to be passed in when building external/poppler with clang-cl Change-Id: I2c17bec316081a0cdc789a84bb1447acf5e893c0 diff --git a/solenv/gcc-wrappers/wrapper.cxx b/solenv/gcc-wrappers/wrapper.cxx index 0c60934..60e6159 100644 --- a/solenv/gcc-wrappers/wrapper.cxx +++ b/solenv/gcc-wrappers/wrapper.cxx @@ -147,7 +147,7 @@ string processccargs(vector<string> rawargs) { // "foo.def" by itself linkargs.append(" " + *i); } - else if(!(*i).compare(0,12,"-fvisibility")) { + else if(!(*i).compare(0,12,"-fvisibility") || *i == "-fPIC") { //TODO: drop other gcc-specific options } else if(!(*i).compare(0,4,"-Wl,")) { commit f95f1df02e76d44347cba47fb454c32dbd8fb501 Author: Stephan Bergmann <sberg...@redhat.com> Date: Tue Dec 1 11:24:13 2015 +0100 clang-cl needs -Wno-missing-braces ...as in com_GCC_defs.mk Change-Id: Ic086a6f08945698cd35a312f98491cba403b9582 diff --git a/solenv/gbuild/platform/com_MSC_defs.mk b/solenv/gbuild/platform/com_MSC_defs.mk index 6ff3880..88d8695 100644 --- a/solenv/gbuild/platform/com_MSC_defs.mk +++ b/solenv/gbuild/platform/com_MSC_defs.mk @@ -232,6 +232,12 @@ gb_CFLAGS += \ endif +ifeq ($(COM_IS_CLANG),TRUE) +gb_CXXFLAGS += \ + -Wno-missing-braces \ + +endif + # rc.exe does not support -nologo in 6.1.6723.1 that is in the Windows SDK 6.0A gb_RCFLAGS += -nologo commit b3e1b52252e7b1a807504d9bbdf88a58d6325d0b Author: Stephan Bergmann <sberg...@redhat.com> Date: Tue Dec 1 11:06:05 2015 +0100 Adapt new/delete exception specs for MSVC ...where plain operator new/delete are reportedly predefined (cf. <www.geoffchappell.com/studies/msvc/language/predefined/index.html>) without any exception specs, then redeclared in C:/PROGRA~2/MICROS~1.0/VC/include/new with exception specs that are ignored by MSVC (so it presumably doesn't even complain about the mismatching redeclarations, just effectively ignores them); and array operator new/delete are declared in C:/PROGRA~2/MICROS~1.0/VC/include/crtdbg.h without any exception specs. clang-cl would warn about those inconsistencies. Change-Id: I4dd15e4cfcedc3de5e8617b43769b5371cafa71f diff --git a/sal/cpprt/operators_new_delete.cxx b/sal/cpprt/operators_new_delete.cxx index 13491bd..8cf69ff 100644 --- a/sal/cpprt/operators_new_delete.cxx +++ b/sal/cpprt/operators_new_delete.cxx @@ -145,7 +145,10 @@ static void deallocate (void * p, AllocatorTraits const & rTraits) // T * p = new T; delete p; -void* SAL_CALL operator new (std::size_t n) throw (std::bad_alloc) +void* SAL_CALL operator new (std::size_t n) +#if !defined _MSC_VER + throw (std::bad_alloc) +#endif { return allocate (n, ScalarTraits()); } @@ -188,7 +191,10 @@ void* SAL_CALL operator new[] (std::size_t n) throw (std::bad_alloc) return allocate (n, VectorTraits()); } -void SAL_CALL operator delete[] (void * p) throw () +void SAL_CALL operator delete[] (void * p) +#if !defined _MSC_VER + throw () +#endif { deallocate (p, VectorTraits()); } commit 803bff584c1c6861e33a91f5075ba68a089a8c8e Author: Stephan Bergmann <sberg...@redhat.com> Date: Tue Dec 1 10:40:45 2015 +0100 -Werror,-Wint-to-pointer-cast Appart from the by-design type-punned use in CreateWindowEx, m_uID is (only) used in a call to MAKEWPARAM (to create a WPARAM to pass into a SendMessage call), so the most realistic type to use seems to be WORD. And CHatchWindow::Init is only called with a value of 2000 (from docholder.cxx), anyway. Change-Id: I4b6554d1ca9bb3926378c9e25a5473609f5951c5 diff --git a/embedserv/source/embed/syswinwrapper.cxx b/embedserv/source/embed/syswinwrapper.cxx index 303f49a..a71b9ef 100644 --- a/embedserv/source/embed/syswinwrapper.cxx +++ b/embedserv/source/embed/syswinwrapper.cxx @@ -186,7 +186,7 @@ CHatchWin::~CHatchWin() * * Parameters: * hWndParent HWND of the parent of this window - * uID UINT identifier for this window (send in + * uID WORD identifier for this window (send in * notifications to associate window). * hWndAssoc HWND of the initial associate. * @@ -194,14 +194,14 @@ CHatchWin::~CHatchWin() * BOOL TRUE if the function succeeded, FALSE otherwise. */ -BOOL CHatchWin::Init(HWND hWndParent, UINT uID, HWND hWndAssoc) +BOOL CHatchWin::Init(HWND hWndParent, WORD uID, HWND hWndAssoc) { m_hWndParent = hWndParent; m_hWnd=CreateWindowEx( WS_EX_NOPARENTNOTIFY, SZCLASSHATCHWIN , SZCLASSHATCHWIN, WS_CHILD | WS_CLIPSIBLINGS - | WS_CLIPCHILDREN, 0, 0, 100, 100, hWndParent, (HMENU)uID - , m_hInst, this); + | WS_CLIPCHILDREN, 0, 0, 100, 100, hWndParent + , reinterpret_cast<HMENU>(UINT_PTR(uID)), m_hInst, this); m_uID=uID; m_hWndAssociate=hWndAssoc; diff --git a/embedserv/source/inc/syswinwrapper.hxx b/embedserv/source/inc/syswinwrapper.hxx index 422dff9..9814248 100644 --- a/embedserv/source/inc/syswinwrapper.hxx +++ b/embedserv/source/inc/syswinwrapper.hxx @@ -146,7 +146,7 @@ protected: int m_dBorder; int m_dBorderOrg; - UINT m_uID; + WORD m_uID; HWND m_hWndParent; HWND m_hWndKid; HWND m_hWndAssociate; @@ -157,7 +157,7 @@ protected: CHatchWin(HINSTANCE,const DocumentHolder*); ~CHatchWin(); - BOOL Init(HWND, UINT, HWND); + BOOL Init(HWND, WORD, HWND); HWND HwndAssociateSet(HWND); HWND HwndAssociateGet(); commit 2195299ab60d71a72c37690f88575f71b3d568ff Author: Stephan Bergmann <sberg...@redhat.com> Date: Tue Dec 1 10:17:35 2015 +0100 Where to find ATL files doesn't depend on --enable-activex ...but, according to the 'Doesn't exist for VSE' comment, apparently rather on the compiler version installed Change-Id: I49a87fa55facee8ee66e2b44d7090d06fb104b89 diff --git a/configure.ac b/configure.ac index d180f82..b97442f 100644 --- a/configure.ac +++ b/configure.ac @@ -12809,12 +12809,12 @@ AC_MSG_NOTICE([setting up the build environment variables...]) AC_SUBST(COMPATH) if test "$build_os" = "cygwin"; then - if test "$DISABLE_ACTIVEX" = "TRUE"; then - ATL_LIB="$WINDOWS_SDK_HOME/lib" # Doesn't exist for VSE - ATL_INCLUDE="$WINDOWS_SDK_HOME/include/atl" - else + if test -d "$COMPATH/atlmfc/lib"; then ATL_LIB="$COMPATH/atlmfc/lib" ATL_INCLUDE="$COMPATH/atlmfc/include" + else + ATL_LIB="$WINDOWS_SDK_HOME/lib" # Doesn't exist for VSE + ATL_INCLUDE="$WINDOWS_SDK_HOME/include/atl" fi if test "$BITNESS_OVERRIDE" = 64; then ATL_LIB="$ATL_LIB/amd64" commit c4688ad97e4b5f1c0e7fd94937013ddc1c868139 Author: Stephan Bergmann <sberg...@redhat.com> Date: Tue Dec 1 10:08:32 2015 +0100 Allow --disable-pch for clang-cl ...which doesn't support the cl PCH cmd line args yet Change-Id: I0a5a4d6c82138992c6e40b5958a41a7fa0be88ac diff --git a/configure.ac b/configure.ac index 75323dc..d180f82 100644 --- a/configure.ac +++ b/configure.ac @@ -4938,11 +4938,11 @@ dnl enable pch by default on windows dnl enable it explicitely otherwise AC_MSG_CHECKING([whether to enable pch feature]) ENABLE_PCH="" -if test "$_os" = "WINNT" -a "$WITH_MINGW" != "yes"; then - ENABLE_PCH="TRUE" - AC_MSG_RESULT([yes]) -elif test "$enable_pch" != "no"; then - if test -n "$enable_pch" && test "$GCC" = "yes"; then +if test "$enable_pch" != "no"; then + if test "$_os" = "WINNT" -a "$WITH_MINGW" != "yes"; then + ENABLE_PCH="TRUE" + AC_MSG_RESULT([yes]) + elif test -n "$enable_pch" && test "$GCC" = "yes"; then ENABLE_PCH="TRUE" AC_MSG_RESULT([yes]) elif test -n "$enable_pch"; then commit 871b5abf1198c6b385eef844fa0c1192ccf42592 Author: Stephan Bergmann <sberg...@redhat.com> Date: Tue Dec 1 09:58:00 2015 +0100 Work around missing __CxxDetectRethrow in clang-cl Change-Id: Ia42d39f04b22986d3fd873655b48dc31d834caee diff --git a/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx b/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx index 120ac49..7d1c1fa 100644 --- a/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx +++ b/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx @@ -252,6 +252,12 @@ void #include "mscx.hxx" #include "bridges/cpp_uno/shared/except.hxx" +//TOOD: Work around missing __CxxDetectRethrow in clang-cl for now (predefined +// in cl, <www.geoffchappell.com/studies/msvc/language/predefined/index.html>): +#if defined __clang__ +extern "C" int __cdecl __CxxDetectRethrow(void *); +#endif + #pragma pack(push, 8) using namespace ::com::sun::star::uno; commit cb8cd417de869517b4c5a30a201602e76e94aae4 Author: Stephan Bergmann <sberg...@redhat.com> Date: Mon Nov 30 14:21:43 2015 +0100 Be explicit about missing env vars Change-Id: I1023779749c3ce114d637a39a72bc9038324f01d diff --git a/solenv/gcc-wrappers/wrapper.cxx b/solenv/gcc-wrappers/wrapper.cxx index e68603c..0c60934 100644 --- a/solenv/gcc-wrappers/wrapper.cxx +++ b/solenv/gcc-wrappers/wrapper.cxx @@ -37,6 +37,10 @@ void setupccenv() { char* libbuf; size_t liblen; _dupenv_s(&libbuf,&liblen,"ILIB"); + if (libbuf == nullptr) { + std::cerr << "No environment variable ILIB" << std::endl; + std::exit(EXIT_FAILURE); + } libpath.append(libbuf); free(libbuf); if(_putenv(libpath.c_str())<0) { @@ -49,6 +53,10 @@ void setupccenv() { char* incbuf; size_t inclen; _dupenv_s(&incbuf,&inclen,"SOLARINC"); + if (incbuf == nullptr) { + std::cerr << "No environment variable SOLARINC" << std::endl; + std::exit(EXIT_FAILURE); + } string inctmp(incbuf); free(incbuf); commit ac5d4693ce4ec3fc1b10c83c27d09ca61de8188f Author: Stephan Bergmann <sberg...@redhat.com> Date: Mon Nov 30 14:18:47 2015 +0100 Fix quoting Change-Id: I4a4a7c4a1596837c2f221d856228d7d26482ede3 diff --git a/sal/Library_sal.mk b/sal/Library_sal.mk index 79a0e2a..ee25cd2 100644 --- a/sal/Library_sal.mk +++ b/sal/Library_sal.mk @@ -28,8 +28,8 @@ $(eval $(call gb_Library_add_defs,sal,\ ) \ $(LFS_CFLAGS) \ -DSAL_DLLIMPLEMENTATION \ - -DRTL_OS="\"$(RTL_OS)"\" \ - -DRTL_ARCH="\"$(RTL_ARCH)"\" \ + -DRTL_OS="\"$(RTL_OS)\"" \ + -DRTL_ARCH="\"$(RTL_ARCH)\"" \ -DSRCDIR="\"$(SRCDIR)\"" \ )) commit 72b17442010d512f6cf96a871409b1777ed08748 Author: Stephan Bergmann <sberg...@redhat.com> Date: Mon Nov 30 14:14:52 2015 +0100 Silence clang-cl -Winvalid-offsetof in ATL-macro expansion Change-Id: I2bfa87abd111faf414d2603025d3613f7e0ae104 diff --git a/extensions/source/activex/SOActiveX.h b/extensions/source/activex/SOActiveX.h index 515b0ee..bacee818 100644 --- a/extensions/source/activex/SOActiveX.h +++ b/extensions/source/activex/SOActiveX.h @@ -124,6 +124,12 @@ BEGIN_COM_MAP(CSOActiveX) COM_INTERFACE_ENTRY(IObjectSafety) END_COM_MAP() +#if defined __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Winvalid-offsetof" + // offset of on non-standard-layout type '_PropMapClass' (aka 'CSOActiveX'), + // expanded from macro 'PROP_DATA_ENTRY' +#endif BEGIN_PROP_MAP(CSOActiveX) PROP_DATA_ENTRY("_cx", m_sizeExtent.cx, VT_UI4) PROP_DATA_ENTRY("_cy", m_sizeExtent.cy, VT_UI4) @@ -131,6 +137,9 @@ BEGIN_PROP_MAP(CSOActiveX) // PROP_ENTRY("Property Description", dispid, clsid) // PROP_PAGE(CLSID_StockColorPage) END_PROP_MAP() +#if defined __clang__ +#pragma clang diagnostic pop +#endif BEGIN_CONNECTION_POINT_MAP(CSOActiveX) END_CONNECTION_POINT_MAP() commit 5a4791a8f50192935caa4e7b2032f9cd78b307e5 Author: Stephan Bergmann <sberg...@redhat.com> Date: Mon Nov 30 14:11:45 2015 +0100 Silence clang-cl warnings in ATL headers Change-Id: I85df6250d4cae3dd6bd516f2086af7efcf2cd562 diff --git a/extensions/source/activex/StdAfx2.h b/extensions/source/activex/StdAfx2.h index 484edfc..8d929a9 100644 --- a/extensions/source/activex/StdAfx2.h +++ b/extensions/source/activex/StdAfx2.h @@ -40,6 +40,19 @@ // expression before comma has no effect; expected expression with side-effect #pragma warning (disable:4555) // expression has no effect; expected expression with side-effect +#if defined __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wall" +#pragma clang diagnostic ignored "-Wattributes" +#pragma clang diagnostic ignored "-Wdelete-incomplete" +#pragma clang diagnostic ignored "-Wdynamic-class-memaccess" +#pragma clang diagnostic ignored "-Wint-to-pointer-cast" +#pragma clang diagnostic ignored "-Winvalid-noreturn" +#pragma clang diagnostic ignored "-Wmicrosoft" +#pragma clang diagnostic ignored "-Wnon-pod-varargs" +#pragma clang diagnostic ignored "-Wsequence-point" +#pragma clang diagnostic ignored "-Wtypename-missing" +#endif #define min(a, b) (((a) < (b)) ? (a) : (b)) #include <atlbase.h> @@ -50,6 +63,9 @@ extern CComModule _Module; #include <atlcom.h> #include <atlctl.h> +#if defined __clang__ +#pragma clang diagnostic pop +#endif #pragma warning (pop) //{{AFX_INSERT_LOCATION}} commit 5ccdc4187bd679c41d89b920847fe0c04d81bdb8 Author: Stephan Bergmann <sberg...@redhat.com> Date: Mon Nov 30 14:10:12 2015 +0100 Silence clang-cl -Wextra-tokens in midl-generated code Change-Id: I30d09560bf948c2659f479ef55b58a2007fcbc1b diff --git a/extensions/source/activex/so_activex.cxx b/extensions/source/activex/so_activex.cxx index 2a73949..51ff332 100644 --- a/extensions/source/activex/so_activex.cxx +++ b/extensions/source/activex/so_activex.cxx @@ -29,7 +29,16 @@ #include <initguid.h> #include "so_activex.h" +#if defined __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wextra-tokens" + // "#endif !_MIDL_USE_GUIDDEF_" in midl-generated code +#endif #include "so_activex_i.c" +#if defined __clang__ +#pragma clang diagnostic pop +#endif + #include "SOActiveX.h" #include <comphelper\documentconstants.hxx> commit c59646dce5d4469c0b83d5c32510ae4e431b7dc3 Author: Stephan Bergmann <sberg...@redhat.com> Date: Mon Nov 30 14:07:10 2015 +0100 Silence clang-cl warnings in ATL headers Change-Id: Id94279d0086bc29569783f4e0b5d975be162e823 diff --git a/embedserv/source/inc/embeddocaccess.hxx b/embedserv/source/inc/embeddocaccess.hxx index 01e87e9..712167b 100644 --- a/embedserv/source/inc/embeddocaccess.hxx +++ b/embedserv/source/inc/embeddocaccess.hxx @@ -30,7 +30,15 @@ #include <oleidl.h> #ifndef __MINGW32__ #pragma warning(disable : 4265) +#if defined __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wall" +#pragma clang diagnostic ignored "-Wmicrosoft" +#endif #include <atldbcli.h> +#if defined __clang__ +#pragma clang diagnostic pop +#endif #endif #include <cppuhelper/weak.hxx> diff --git a/embedserv/source/inc/stdafx.h b/embedserv/source/inc/stdafx.h index 8ecf254..7b147a8 100644 --- a/embedserv/source/inc/stdafx.h +++ b/embedserv/source/inc/stdafx.h @@ -17,6 +17,19 @@ #pragma warning(push) #pragma warning(push, 1) #pragma warning(disable: 4548) +#if defined __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wall" +#pragma clang diagnostic ignored "-Wattributes" +#pragma clang diagnostic ignored "-Wdelete-incomplete" +#pragma clang diagnostic ignored "-Wdynamic-class-memaccess" +#pragma clang diagnostic ignored "-Wint-to-pointer-cast" +#pragma clang diagnostic ignored "-Winvalid-noreturn" +#pragma clang diagnostic ignored "-Wmicrosoft" +#pragma clang diagnostic ignored "-Wnon-pod-varargs" +#pragma clang diagnostic ignored "-Wsequence-point" +#pragma clang diagnostic ignored "-Wtypename-missing" +#endif #endif #include <atlbase.h> //You may derive a class from CComModule and use it if you want to override @@ -34,6 +47,9 @@ using ::std::max; // Microsoft Visual C++ will insert additional declarations immediately before the previous line. #ifdef _MSC_VER +#if defined __clang__ +#pragma clang diagnostic pop +#endif #pragma warning(pop) #pragma warning(pop) #endif commit f6bb9d16965cd672957a87e780f88819bc01d567 Author: Stephan Bergmann <sberg...@redhat.com> Date: Mon Nov 30 14:05:25 2015 +0100 Check clang-cl for HAVE_GCC_ATTRIBUTE_WARN_UNUSED, too Change-Id: I820ea4b3efc51a0464470a8a53d022602d635c81 diff --git a/configure.ac b/configure.ac index 8593722..75323dc 100644 --- a/configure.ac +++ b/configure.ac @@ -6051,19 +6051,6 @@ if test "$GCC" = "yes"; then ], [AC_MSG_RESULT([no])]) AC_LANG_POP([C++]) - AC_MSG_CHECKING([whether $CXX supports __attribute__((warn_unused))]) - AC_LANG_PUSH([C++]) - save_CXXFLAGS=$CXXFLAGS - CXXFLAGS="$CXXFLAGS -Werror -Wunknown-pragmas" - AC_COMPILE_IFELSE([AC_LANG_SOURCE([ - struct __attribute__((warn_unused)) dummy {}; - ])], [ - AC_DEFINE([HAVE_GCC_ATTRIBUTE_WARN_UNUSED],[1]) - AC_MSG_RESULT([yes]) - ], [AC_MSG_RESULT([no])]) - CXXFLAGS=$save_CXXFLAGS - AC_LANG_POP([C++]) - AC_MSG_CHECKING([whether STL uses __attribute__((warn_unused))]) AC_LANG_PUSH([C++]) save_CXXFLAGS=$CXXFLAGS @@ -6080,6 +6067,19 @@ if test "$GCC" = "yes"; then AC_LANG_POP([C++]) fi +AC_MSG_CHECKING([whether $CXX supports __attribute__((warn_unused))]) +AC_LANG_PUSH([C++]) +save_CXXFLAGS=$CXXFLAGS +CXXFLAGS="$CXXFLAGS -Werror -Wunknown-pragmas" +AC_COMPILE_IFELSE([AC_LANG_SOURCE([ + struct __attribute__((warn_unused)) dummy {}; + ])], [ + AC_DEFINE([HAVE_GCC_ATTRIBUTE_WARN_UNUSED],[1]) + AC_MSG_RESULT([yes]) + ], [AC_MSG_RESULT([no])]) +CXXFLAGS=$save_CXXFLAGS +AC_LANG_POP([C++]) + AC_SUBST(HAVE_GCC_AVX) AC_SUBST(HAVE_GCC_STACK_PROTECTOR_STRONG) AC_SUBST(HAVE_GCC_BUILTIN_ATOMIC) commit a846982f9e6c780ba61525fd8dfc30e429ff52ae Author: Stephan Bergmann <sberg...@redhat.com> Date: Sat Nov 28 13:19:15 2015 +0100 -Werror,-Wunused-private-field Change-Id: Icf15313f5bcacbe9c7efa0b4161929dbb3e39c1e diff --git a/fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx b/fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx index cb98071..7194bc9 100644 --- a/fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx +++ b/fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx @@ -149,7 +149,6 @@ VistaFilePickerImpl::VistaFilePickerImpl() , m_iDialogSave () , m_hLastResult () , m_lFilters () - , m_lLastFiles () , m_iEventHandler(new VistaFilePickerEventHandler(this)) , m_bInExecute (sal_False) , m_bWasExecuted (sal_False) diff --git a/fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx b/fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx index 47e1be6..64fbd5b 100644 --- a/fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx +++ b/fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx @@ -45,9 +45,6 @@ #include "IVistaFilePickerInternalNotify.hxx" #include "../misc/resourceprovider.hxx" -#include <com/sun/star/uno/Sequence.hxx> - -#include <comphelper/sequenceashashmap.hxx> #include <cppuhelper/interfacecontainer.h> #include <cppuhelper/basemutex.hxx> #include <osl/thread.hxx> @@ -302,15 +299,6 @@ class VistaFilePickerImpl : private ::cppu::BaseMutex CFilterContainer m_lFilters; - /** cache last selected list of files - * Because those list must be retrieved directly after closing the dialog - * (and only in case it was finished successfully) we cache it internally. - * Because the outside provided UNO API decouple showing the dialog - * and asking for results .-) - */ - css::uno::Sequence< OUString > m_lLastFiles; - - /** help us to handle dialog events and provide them to interested office * listener. */
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits