Revert r197496, as it broke REVERTIBLE_TYPE_TRAITs from PCH files.

Also add a test to make sure that this doesn't break again. Fixes PR21036.

llvm-svn: 218292
diff --git a/clang/test/PCH/cxx-traits.cpp b/clang/test/PCH/cxx-traits.cpp
index ffdfccc..42656a3 100644
--- a/clang/test/PCH/cxx-traits.cpp
+++ b/clang/test/PCH/cxx-traits.cpp
@@ -8,8 +8,12 @@
 // expected-no-diagnostics
 #endif
 
-bool _Is_pod_comparator = __is_pod<int>::__value;
-bool _Is_empty_check = __is_empty<int>::__value;
+bool _Is_pod_comparator = n::__is_pod<int>::__value;
+bool _Is_empty_check = n::__is_empty<int>::__value;
 
-bool default_construct_int = is_trivially_constructible<int>::value;
-bool copy_construct_int = is_trivially_constructible<int, const int&>::value;
+bool default_construct_int = n::is_trivially_constructible<int>::value;
+bool copy_construct_int = n::is_trivially_constructible<int, const int&>::value;
+
+// The built-ins should still work too:
+bool _is_pod_result = __is_pod(int);
+bool _is_empty_result = __is_empty(int);
diff --git a/clang/test/PCH/cxx-traits.h b/clang/test/PCH/cxx-traits.h
index e6f2feb..59ba513 100644
--- a/clang/test/PCH/cxx-traits.h
+++ b/clang/test/PCH/cxx-traits.h
@@ -1,5 +1,7 @@
 // Header for PCH test cxx-traits.cpp
 
+namespace n {
+
 template<typename _Tp>
 struct __is_pod { // expected-warning {{keyword '__is_pod' will be made available as an identifier for the remainder of the translation unit}}
   enum { __value };
@@ -14,3 +16,5 @@
 struct is_trivially_constructible {
   static const bool value = __is_trivially_constructible(T, Args...);
 };
+
+}