diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-09-09 20:53:38 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-09-09 20:53:38 +0000 |
commit | d023aec8907831a18d3514a95b843a7ee06b6b5e (patch) | |
tree | 4ca632e18dc3b46d86ed30410cc49728473ef27a /lib/Sema/SemaTemplate.cpp | |
parent | 13db5cfc4e5f03eb70efe0d227b53b8280f16161 (diff) |
Specializations cannot be module-hidden. Diagnose attempts to do so.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139406 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplate.cpp')
-rw-r--r-- | lib/Sema/SemaTemplate.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Sema/SemaTemplate.cpp b/lib/Sema/SemaTemplate.cpp index 4b3f6c45d5..f613ebb36c 100644 --- a/lib/Sema/SemaTemplate.cpp +++ b/lib/Sema/SemaTemplate.cpp @@ -4725,6 +4725,7 @@ DeclResult Sema::ActOnClassTemplateSpecialization(Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc, + SourceLocation ModulePrivateLoc, CXXScopeSpec &SS, TemplateTy TemplateD, SourceLocation TemplateNameLoc, @@ -5090,6 +5091,11 @@ Sema::ActOnClassTemplateSpecialization(Scope *S, unsigned TagSpec, if (Attr) ProcessDeclAttributeList(S, Specialization, Attr); + if (ModulePrivateLoc.isValid()) + Diag(Specialization->getLocation(), diag::err_module_private_specialization) + << (isPartialSpecialization? 1 : 0) + << FixItHint::CreateRemoval(ModulePrivateLoc); + // Build the fully-sugared type for this class template // specialization as the user wrote in the specialization // itself. This means that we'll pretty-print the type retrieved |