diff options
author | John McCall <rjmccall@apple.com> | 2012-08-10 03:15:35 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2012-08-10 03:15:35 +0000 |
commit | a0a96895501ecb3696c9ef80289584fe885a4abe (patch) | |
tree | 87db81b8be84935ee55fb88648386447698b76ba /clang/lib/Sema/SemaTemplateInstantiate.cpp | |
parent | 740a6bc8a0425e1e9fd88f2cd7f5f4ae5db3b003 (diff) | |
download | bcm5719-llvm-a0a96895501ecb3696c9ef80289584fe885a4abe.tar.gz bcm5719-llvm-a0a96895501ecb3696c9ef80289584fe885a4abe.zip |
Check access to friend declarations. There's a number of different
things going on here that were problematic:
- We were missing the actual access check, or rather, it was suppressed
on account of being a redeclaration lookup.
- The access check would naturally happen during delay, which isn't
appropriate in this case.
- We weren't actually emitting dependent diagnostics associated with
class templates, which was unfortunate.
- Access was being propagated incorrectly for friend method declarations
that couldn't be matched at parse-time.
llvm-svn: 161652
Diffstat (limited to 'clang/lib/Sema/SemaTemplateInstantiate.cpp')
-rw-r--r-- | clang/lib/Sema/SemaTemplateInstantiate.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaTemplateInstantiate.cpp b/clang/lib/Sema/SemaTemplateInstantiate.cpp index 102ec993ef3..c7cbc41b303 100644 --- a/clang/lib/Sema/SemaTemplateInstantiate.cpp +++ b/clang/lib/Sema/SemaTemplateInstantiate.cpp @@ -2005,6 +2005,9 @@ Sema::InstantiateClass(SourceLocation PointOfInstantiation, } if (!Instantiation->isInvalidDecl()) { + // Perform any dependent diagnostics from the pattern. + PerformDependentDiagnostics(Pattern, TemplateArgs); + // Instantiate any out-of-line class template partial // specializations now. for (TemplateDeclInstantiator::delayed_partial_spec_iterator |