| Index: source/common/unicode/platform.h
|
| diff --git a/source/common/unicode/platform.h b/source/common/unicode/platform.h
|
| index 8eed735ac8f92db71dfb45f285463186014e853e..b42bef8323415607d7c71dc144d500c7521a5739 100644
|
| --- a/source/common/unicode/platform.h
|
| +++ b/source/common/unicode/platform.h
|
| @@ -1,7 +1,9 @@
|
| +// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
| +// License & terms of use: http://www.unicode.org/copyright.html
|
| /*
|
| ******************************************************************************
|
| *
|
| -* Copyright (C) 1997-2015, International Business Machines
|
| +* Copyright (C) 1997-2016, International Business Machines
|
| * Corporation and others. All Rights Reserved.
|
| *
|
| ******************************************************************************
|
| @@ -428,10 +430,13 @@
|
| # define U_HAVE_DEBUG_LOCATION_NEW 0
|
| #endif
|
|
|
| -/* Compatibility with non clang compilers */
|
| +/* Compatibility with non clang compilers: http://clang.llvm.org/docs/LanguageExtensions.html */
|
| #ifndef __has_attribute
|
| # define __has_attribute(x) 0
|
| #endif
|
| +#ifndef __has_cpp_attribute
|
| +# define __has_cpp_attribute(x) 0
|
| +#endif
|
| #ifndef __has_builtin
|
| # define __has_builtin(x) 0
|
| #endif
|
| @@ -441,6 +446,9 @@
|
| #ifndef __has_extension
|
| # define __has_extension(x) 0
|
| #endif
|
| +#ifndef __has_warning
|
| +# define __has_warning(x) 0
|
| +#endif
|
|
|
| /**
|
| * \def U_MALLOC_ATTR
|
| @@ -514,6 +522,8 @@
|
| */
|
| #ifdef U_NOEXCEPT
|
| /* Use the predefined value. */
|
| +#elif defined(_HAS_EXCEPTIONS) && !_HAS_EXCEPTIONS /* Visual Studio */
|
| +# define U_NOEXCEPT
|
| #elif U_CPLUSPLUS_VERSION >= 11 || __has_feature(cxx_noexcept) || __has_extension(cxx_noexcept) \
|
| || (defined(_MSC_VER) && _MSC_VER >= 1900) /* Visual Studio 2015 */
|
| # define U_NOEXCEPT noexcept
|
| @@ -521,6 +531,24 @@
|
| # define U_NOEXCEPT
|
| #endif
|
|
|
| +/**
|
| + * \def U_FALLTHROUGH
|
| + * Annotate intentional fall-through between switch labels.
|
| + * http://clang.llvm.org/docs/AttributeReference.html#fallthrough-clang-fallthrough
|
| + * @internal
|
| + */
|
| +#ifdef __cplusplus
|
| +# if __has_cpp_attribute(clang::fallthrough) || \
|
| + (__has_feature(cxx_attributes) && __has_warning("-Wimplicit-fallthrough"))
|
| +# define U_FALLTHROUGH [[clang::fallthrough]]
|
| +# else
|
| +# define U_FALLTHROUGH
|
| +# endif
|
| +#else
|
| +# define U_FALLTHROUGH
|
| +#endif
|
| +
|
| +
|
| /** @} */
|
|
|
| /*===========================================================================*/
|
| @@ -815,6 +843,12 @@
|
| * This is only used for non-ICU-API functions.
|
| * When a function is a public ICU API,
|
| * you must use the U_CAPI and U_EXPORT2 qualifiers.
|
| + *
|
| + * Please note, you need to use U_CALLCONV after the *.
|
| + *
|
| + * NO : "static const char U_CALLCONV *func( . . . )"
|
| + * YES: "static const char* U_CALLCONV func( . . . )"
|
| + *
|
| * @stable ICU 2.0
|
| */
|
| #if U_PLATFORM == U_PF_OS390 && defined(__cplusplus)
|
|
|