From: Reid Kleckner Date: Thu, 5 Dec 2013 01:03:23 +0000 (+0000) Subject: Compiler.h: Disable initializer list usage with clang-cl X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=e5218051d44da2d38f94687f732d513126fed362;p=oota-llvm.git Compiler.h: Disable initializer list usage with clang-cl Most people are using MSVC 2012, which lacks the 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196448 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/Support/Compiler.h b/include/llvm/Support/Compiler.h index 860f43e9423..ea394a40019 100644 --- a/include/llvm/Support/Compiler.h +++ b/include/llvm/Support/Compiler.h @@ -404,8 +404,10 @@ #endif /// \brief Does the compiler support generalized initializers (using braced -/// lists and std::initializer_list). -#if __has_feature(cxx_generalized_initializers) +/// lists and std::initializer_list). While clang may claim it supports general +/// 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 #else #define LLVM_HAS_INITIALIZER_LISTS 0