Enhance testing of overriding exception specs for inaccessible base exceptions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76317 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaType.cpp b/lib/Sema/SemaType.cpp
index 8195aba..036ccc8 100644
--- a/lib/Sema/SemaType.cpp
+++ b/lib/Sema/SemaType.cpp
@@ -1294,7 +1294,7 @@
     bool SubIsClass = CanonicalSubT->isRecordType();
     CanonicalSubT.setCVRQualifiers(0);
 
-    BasePaths Paths(/*FindAmbiguities=*/true, /*RecordPaths=*/false,
+    BasePaths Paths(/*FindAmbiguities=*/true, /*RecordPaths=*/true,
                     /*DetectVirtual=*/false);
 
     bool Contained = false;
@@ -1332,7 +1332,8 @@
       if (Paths.isAmbiguous(CanonicalSuperT))
         continue;
 
-      // FIXME: Check base access. Don't forget to enable path recording.
+      if (FindInaccessibleBase(CanonicalSubT, CanonicalSuperT, Paths, true))
+        continue;
 
       Contained = true;
       break;