Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
f58769c8
Kaydet (Commit)
f58769c8
authored
Şub 10, 2015
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Properly check for Clang with static initializer_list bug
Change-Id: I98060f1adae0ba8ec03b2f0d6b0db6d5a1c0385c
üst
5b8947a0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
2 deletions
+34
-2
config_global.h.in
config_host/config_global.h.in
+1
-0
configure.ac
configure.ac
+28
-0
shapes.cxx
oox/source/export/shapes.cxx
+5
-2
No files found.
config_host/config_global.h.in
Dosyayı görüntüle @
f58769c8
...
...
@@ -22,6 +22,7 @@ Any change in this header will cause a rebuild of almost everything.
#define HAVE_GCC_PRAGMA_OPERATOR 0
#define HAVE_GCC_DEPRECATED_MESSAGE 0
#define HAVE_THREADSAFE_STATICS 0
#define HAVE_BROKEN_STATIC_INITILIZER_LIST 0
#define HAVE_SYSLOG_H 0
/* Compiler supports __attribute__((warn_unused)). */
#define HAVE_GCC_ATTRIBUTE_WARN_UNUSED 0
...
...
configure.ac
Dosyayı görüntüle @
f58769c8
...
...
@@ -6225,6 +6225,34 @@ if test "$GCC" = "yes"; then
fi
AC_SUBST(HAVE_GCC_PRAGMA_OPERATOR)
AC_MSG_CHECKING([whether $CXX has broken static initializer_list support])
save_CXXFLAGS=$CXXFLAGS
CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11"
AC_LANG_PUSH([C++])
AC_RUN_IFELSE([AC_LANG_PROGRAM([[
// Exit with failure if the static initializer_list is stored on the stack
// (as done by Clang < 3.4):
#include <initializer_list>
struct S {};
bool g(void const * p1, void const * p2) {
int n;
return !((p1 > p2 && p2 > &n) || (p1 < p2 && p2 < &n));
}
bool f(void const * p1) {
static std::initializer_list<S> s { S() };
return g(p1, s.begin());
}
]],[[
int n;
return f(&n) ? 0 : 1;
]])], [broken=no], [broken=yes])
AC_LANG_POP([C++])
CXXFLAGS=$save_CXXFLAGS
AC_MSG_RESULT([$broken])
if test "$broken" = yes; then
AC_DEFINE([HAVE_BROKEN_STATIC_INITILIZER_LIST])
fi
dnl ===================================================================
dnl system stl sanity tests
dnl ===================================================================
...
...
oox/source/export/shapes.cxx
Dosyayı görüntüle @
f58769c8
...
...
@@ -17,6 +17,9 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <sal/config.h>
#include <config_global.h>
#include <unotools/mediadescriptor.hxx>
#include <filter/msfilter/util.hxx>
#include "oox/core/xmlfilterbase.hxx"
...
...
@@ -283,7 +286,7 @@ ShapeExport& ShapeExport::WriteGroupShape(uno::Reference<drawing::XShape> xShape
static
bool
lcl_IsOnBlacklist
(
OUString
&
rShapeType
)
{
#if !
defined __clang__
#if !
HAVE_BROKEN_STATIC_INITILIZER_LIST
static
#endif
const
std
::
initializer_list
<
OUStringLiteral
>
vBlacklist
=
{
...
...
@@ -347,7 +350,7 @@ static bool lcl_IsOnBlacklist(OUString& rShapeType)
static
bool
lcl_IsOnWhitelist
(
OUString
&
rShapeType
)
{
#if !
defined __clang__
#if !
HAVE_BROKEN_STATIC_INITILIZER_LIST
static
#endif
const
std
::
initializer_list
<
OUStringLiteral
>
vWhitelist
=
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment