Revert r147271. This fixes PR11676.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147362 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CXX/expr/expr.const/p2-0x.cpp b/test/CXX/expr/expr.const/p2-0x.cpp
index f0581fc..d95af8a 100644
--- a/test/CXX/expr/expr.const/p2-0x.cpp
+++ b/test/CXX/expr/expr.const/p2-0x.cpp
@@ -33,11 +33,11 @@
   int m : NonConstexpr2().n; // expected-error {{constant expression}} expected-note {{undefined constructor 'NonConstexpr2'}}
 };
 struct NonConstexpr4 {
-  NonConstexpr4(); // expected-note {{declared here}}
+  NonConstexpr4();
   int n;
 };
 struct NonConstexpr5 {
-  int n : NonConstexpr4().n; // expected-error {{constant expression}} expected-note {{non-constexpr constructor 'NonConstexpr4' cannot be used in a constant expression}}
+  int n : NonConstexpr4().n; // expected-error {{constant expression}} expected-note {{non-literal type 'NonConstexpr4' cannot be used in a constant expression}}
 };
 
 // - an invocation of an undefined constexpr function or an undefined
diff --git a/test/CXX/special/class.ctor/p6-0x.cpp b/test/CXX/special/class.ctor/p6-0x.cpp
index 71afd24..19e324d 100644
--- a/test/CXX/special/class.ctor/p6-0x.cpp
+++ b/test/CXX/special/class.ctor/p6-0x.cpp
@@ -8,16 +8,8 @@
 struct NonConstexpr2 { // expected-note {{here}}
   NonConstexpr1 nl;
 };
-struct NonConstexpr2a : NonConstexpr1 { };
-constexpr NonConstexpr1 nc1 = NonConstexpr1(); // ok, does not call constructor
-constexpr NonConstexpr2 nc2 = NonConstexpr2(); // ok, does not call constructor
-constexpr NonConstexpr2a nc2a = NonConstexpr2a(); // expected-error {{constant expression}} expected-note {{non-literal type 'const NonConstexpr2a'}}
-constexpr int nc2_a = NonConstexpr2().nl.a; // ok
-constexpr int nc2a_a = NonConstexpr2a().a; // ok
-struct Helper {
-  friend constexpr NonConstexpr1::NonConstexpr1(); // expected-error {{follows non-constexpr declaration}}
-  friend constexpr NonConstexpr2::NonConstexpr2(); // expected-error {{follows non-constexpr declaration}}
-};
+constexpr NonConstexpr1 nc1 = NonConstexpr1(); // expected-error {{constant expression}} expected-note {{non-constexpr constructor 'NonConstexpr1'}}
+constexpr NonConstexpr2 nc2 = NonConstexpr2(); // expected-error {{constant expression}} expected-note {{non-constexpr constructor 'NonConstexpr2'}}
 
 struct Constexpr1 {};
 constexpr Constexpr1 c1 = Constexpr1(); // ok
diff --git a/test/CodeGenCXX/value-init.cpp b/test/CodeGenCXX/value-init.cpp
index 6e60f80..fb981d1 100644
--- a/test/CodeGenCXX/value-init.cpp
+++ b/test/CodeGenCXX/value-init.cpp
@@ -134,7 +134,8 @@
   // CHECK: define i32 @_ZN8zeroinit4testEv()
   int test() {
     // CHECK: call void @llvm.memset.p0i8.i64
-    // CHECK: ret i32 0
+    // CHECK: getelementptr
+    // CHECK: ret i32
     return S().i;
   }
 
diff --git a/test/SemaCXX/constexpr-printing.cpp b/test/SemaCXX/constexpr-printing.cpp
index cccefca..e6cf209 100644
--- a/test/SemaCXX/constexpr-printing.cpp
+++ b/test/SemaCXX/constexpr-printing.cpp
@@ -11,11 +11,8 @@
 
 constexpr int extract(const S &s) { return s.n; } // expected-note {{read of uninitialized object is not allowed in a constant expression}}
 
-constexpr S s1; // ok
-void f() {
-  constexpr S s1; // expected-error {{constant expression}} expected-note {{in call to 'S()'}}
-  constexpr S s2(10);
-}
+constexpr S s1; // expected-error {{constant expression}} expected-note {{in call to 'S()'}}
+constexpr S s2(10);
 
 typedef __attribute__((vector_size(16))) int vector_int;
 
diff --git a/test/SemaCXX/constexpr-value-init.cpp b/test/SemaCXX/constexpr-value-init.cpp
deleted file mode 100644
index efa9e94..0000000
--- a/test/SemaCXX/constexpr-value-init.cpp
+++ /dev/null
@@ -1,31 +0,0 @@
-// RUN: %clang_cc1 %s -std=c++11 -fsyntax-only -verify
-
-struct A {
-  constexpr A() : a(b + 1), b(a + 1) {} // expected-note {{uninitialized}}
-  int a;
-  int b;
-};
-struct B {
-  A a;
-};
-
-constexpr A a; // ok, zero initialization preceeds static initialization
-void f() {
-  constexpr A a; // expected-error {{constant expression}} expected-note {{in call to 'A()'}}
-}
-
-constexpr B b1; // expected-error {{requires a user-provided default constructor}}
-constexpr B b2 = B(); // ok
-static_assert(b2.a.a == 1, "");
-static_assert(b2.a.b == 2, "");
-
-struct C {
-  int c;
-};
-struct D : C { int d; };
-constexpr C c1; // expected-error {{requires a user-provided default constructor}}
-constexpr C c2 = C(); // ok
-constexpr D d1; // expected-error {{requires a user-provided default constructor}}
-constexpr D d2 = D(); // expected-error {{constant expression}} expected-note {{non-literal type 'const D'}}
-static_assert(D().c == 0, "");
-static_assert(D().d == 0, "");
diff --git a/test/SemaObjCXX/arc-type-traits.mm b/test/SemaObjCXX/arc-type-traits.mm
index 9877870..b876018 100644
--- a/test/SemaObjCXX/arc-type-traits.mm
+++ b/test/SemaObjCXX/arc-type-traits.mm
@@ -53,16 +53,16 @@
 TRAIT_IS_TRUE(__has_trivial_destructor, __unsafe_unretained id);
 
 // __is_literal
-TRAIT_IS_TRUE(__is_literal, __strong id);
-TRAIT_IS_TRUE(__is_literal, __weak id);
-TRAIT_IS_TRUE(__is_literal, __autoreleasing id);
-TRAIT_IS_TRUE(__is_literal, __unsafe_unretained id);
+TRAIT_IS_FALSE(__is_literal, __strong id);
+TRAIT_IS_FALSE(__is_literal, __weak id);
+TRAIT_IS_FALSE(__is_literal, __autoreleasing id);
+TRAIT_IS_FALSE(__is_literal, __unsafe_unretained id);
 
 // __is_literal_type
-TRAIT_IS_TRUE(__is_literal_type, __strong id);
-TRAIT_IS_TRUE(__is_literal_type, __weak id);
-TRAIT_IS_TRUE(__is_literal_type, __autoreleasing id);
-TRAIT_IS_TRUE(__is_literal_type, __unsafe_unretained id);
+TRAIT_IS_FALSE(__is_literal_type, __strong id);
+TRAIT_IS_FALSE(__is_literal_type, __weak id);
+TRAIT_IS_FALSE(__is_literal_type, __autoreleasing id);
+TRAIT_IS_FALSE(__is_literal_type, __unsafe_unretained id);
 
 // __is_pod
 TRAIT_IS_FALSE(__is_pod, __strong id);