PR44514: Fix recovery from noexcept with non-convertible expressions

We currently treat noexcept(not-convertible-to-bool) as 'none', which
results in the typeloc info being a different size, and causing an
assert later on in the process.  In order to make recovery less
destructive, replace this with noexcept(false) and a constructed 'false'
expression.

Bug Report: https://bugs.llvm.org/show_bug.cgi?id=44514

Differential Revision: https://reviews.llvm.org/D72621
diff --git a/clang/lib/Sema/SemaExceptionSpec.cpp b/clang/lib/Sema/SemaExceptionSpec.cpp
index 959cdad..5aedbe7 100644
--- a/clang/lib/Sema/SemaExceptionSpec.cpp
+++ b/clang/lib/Sema/SemaExceptionSpec.cpp
@@ -81,8 +81,16 @@
                                    ExceptionSpecificationType &EST) {
   // FIXME: This is bogus, a noexcept expression is not a condition.
   ExprResult Converted = CheckBooleanCondition(NoexceptLoc, NoexceptExpr);
-  if (Converted.isInvalid())
-    return Converted;
+  if (Converted.isInvalid()) {
+    EST = EST_NoexceptFalse;
+
+    // Fill in an expression of 'false' as a fixup.
+    auto *BoolExpr = new (Context)
+        CXXBoolLiteralExpr(false, Context.BoolTy, NoexceptExpr->getBeginLoc());
+    llvm::APSInt Value{1};
+    Value = 0;
+    return ConstantExpr::Create(Context, BoolExpr, APValue{Value});
+  }
 
   if (Converted.get()->isValueDependent()) {
     EST = EST_DependentNoexcept;