]> granicus.if.org Git - clang/commitdiff
Suppress access control diagnostics when looking up a base or member name
authorJohn McCall <rjmccall@apple.com>
Fri, 9 Apr 2010 19:01:14 +0000 (19:01 +0000)
committerJohn McCall <rjmccall@apple.com>
Fri, 9 Apr 2010 19:01:14 +0000 (19:01 +0000)
fails to find a type.  There are no cases where it's valid for this to produce
an error.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100878 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaDeclCXX.cpp

index d3985ef3a8db97f076511ff5a8f003deea615864..3eb8713b77726efe7496fc2f9af95e17523d8dac 100644 (file)
@@ -1076,6 +1076,9 @@ Sema::ActOnMemInitializer(DeclPtrTy ConstructorD,
     if (!TyD) {
       if (R.isAmbiguous()) return true;
 
+      // We don't want access-control diagnostics here.
+      R.suppressDiagnostics();
+
       if (SS.isSet() && isDependentScopeSpecifier(SS)) {
         bool NotUnknownSpecialization = false;
         DeclContext *DC = computeDeclContext(SS, false);