Skip to content
Snippets Groups Projects
Commit 51a10fb6 authored by Reid Kleckner's avatar Reid Kleckner
Browse files

Compiler.h: Disable initializer list usage with clang-cl

Most people are using MSVC 2012, which lacks the <initializer_list>
header.  MSVC 2013 shipped with that header, but it has not yet been
tested.  If clang works with the 2013 header, then we can enable this by
checking the value of _MSC_VER.

llvm-svn: 196448
parent ff1264b5
No related branches found
No related tags found
No related merge requests found
...@@ -404,8 +404,10 @@ ...@@ -404,8 +404,10 @@
#endif #endif
/// \brief Does the compiler support generalized initializers (using braced /// \brief Does the compiler support generalized initializers (using braced
/// lists and std::initializer_list). /// lists and std::initializer_list). While clang may claim it supports general
#if __has_feature(cxx_generalized_initializers) /// initializers, if we're using MSVC's headers, we might not have a usable
/// std::initializer list type from the STL. Disable this for now.
#if __has_feature(cxx_generalized_initializers) && !defined(_MSC_VER)
#define LLVM_HAS_INITIALIZER_LISTS 1 #define LLVM_HAS_INITIALIZER_LISTS 1
#else #else
#define LLVM_HAS_INITIALIZER_LISTS 0 #define LLVM_HAS_INITIALIZER_LISTS 0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment