From: John McCall Date: Fri, 9 Apr 2010 19:01:14 +0000 (+0000) Subject: Suppress access control diagnostics when looking up a base or member name X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fd2254405de977dcc706a4dc7775c44a4218a27b;p=clang Suppress access control diagnostics when looking up a base or member name 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 --- diff --git a/lib/Sema/SemaDeclCXX.cpp b/lib/Sema/SemaDeclCXX.cpp index d3985ef3a8..3eb8713b77 100644 --- a/lib/Sema/SemaDeclCXX.cpp +++ b/lib/Sema/SemaDeclCXX.cpp @@ -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);