std::nullptr_t support in MS headers, from João Matos.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159448 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Headers/stddef.h b/lib/Headers/stddef.h
index d7db826..eb919b5 100644
--- a/lib/Headers/stddef.h
+++ b/lib/Headers/stddef.h
@@ -52,6 +52,13 @@
 #  define NULL ((void*)0)
 #endif
 
+#ifdef __cplusplus
+#if defined(_MSC_EXTENSIONS) && defined(_NATIVE_NULLPTR_SUPPORTED)
+namespace std { typedef decltype(nullptr) nullptr_t; }
+using ::std::nullptr_t;
+#endif
+#endif
+
 #define offsetof(t, d) __builtin_offsetof(t, d)
 
 #endif /* __STDDEF_H */