Implement the agreed resolution to DR1457: a signed left shift of a 1 bit into
the sign bit doesn't have undefined behavior, but a signed left shift of a 1 bit
out of the sign bit still does. As promised to Howard :)

The suppression of the potential constant expression checking in system headers
is also removed, since the problem it was working around is gone.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150059 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaDeclCXX.cpp b/lib/Sema/SemaDeclCXX.cpp
index 2c16423..ca64af6 100644
--- a/lib/Sema/SemaDeclCXX.cpp
+++ b/lib/Sema/SemaDeclCXX.cpp
@@ -984,13 +984,8 @@
   // C++11 [dcl.constexpr]p4:
   //   - every constructor involved in initializing non-static data members and
   //     base class sub-objects shall be a constexpr constructor.
-  //
-  // FIXME: We currently disable this check inside system headers, to work
-  // around early STL implementations which contain constexpr functions which
-  // can't produce constant expressions.
   llvm::SmallVector<PartialDiagnosticAt, 8> Diags;
-  if (!Context.getSourceManager().isInSystemHeader(Dcl->getLocation()) &&
-      !IsInstantiation && !Expr::isPotentialConstantExpr(Dcl, Diags)) {
+  if (!IsInstantiation && !Expr::isPotentialConstantExpr(Dcl, Diags)) {
     Diag(Dcl->getLocation(), diag::err_constexpr_function_never_constant_expr)
       << isa<CXXConstructorDecl>(Dcl);
     for (size_t I = 0, N = Diags.size(); I != N; ++I)