forked from OSchip/llvm-project
[libcxx] [test] Suppress MSVC++ warning 4640 under /Zc:threadSafeInit-
This commit is contained in:
parent
837d8129e9
commit
e48849a240
|
@ -347,10 +347,17 @@ public:
|
|||
const bool MemCounter::disable_checking = false;
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable: 4640) // '%s' construction of local static object is not thread safe (/Zc:threadSafeInit-)
|
||||
#endif // _MSC_VER
|
||||
inline MemCounter* getGlobalMemCounter() {
|
||||
static MemCounter counter((MemCounter::MemCounterCtorArg_()));
|
||||
return &counter;
|
||||
}
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
MemCounter &globalMemCounter = *getGlobalMemCounter();
|
||||
|
||||
|
|
|
@ -49,11 +49,18 @@ private:
|
|||
};
|
||||
|
||||
// makeTypeID - Return the TypeID for the specified type 'T'.
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable: 4640) // '%s' construction of local static object is not thread safe (/Zc:threadSafeInit-)
|
||||
#endif // _MSC_VER
|
||||
template <class T>
|
||||
inline TypeID const& makeTypeIDImp() {
|
||||
static const TypeID id(typeid(T).name());
|
||||
return id;
|
||||
}
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
template <class T>
|
||||
struct TypeWrapper {};
|
||||
|
|
Loading…
Reference in New Issue