aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2011-03-09 23:24:34 +0000
committerDaniel Dunbar <daniel@zuster.org>2011-03-09 23:24:34 +0000
commit975cc644d5d9dafdb4060aa31c9753d0554e1308 (patch)
tree7541c7fb4852ccc2aa9c243a34910dfa9a2900e9 /lib/Sema/SemaDecl.cpp
parent910ee57073f87b3f598971d4e96aff9dbf56a6c8 (diff)
Revert r127206 "Detect attempts to provide a specialization of a function within
a...", it appears to cause us to reject various valid codes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127373 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r--lib/Sema/SemaDecl.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index dab4bf7fbe..5e3c5fe8ef 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -4083,14 +4083,9 @@ Sema::ActOnFunctionDeclarator(Scope* S, Declarator& D, DeclContext* DC,
Previous))
NewFD->setInvalidDecl();
} else if (isFunctionTemplateSpecialization) {
- if (CurContext->isDependentContext() && CurContext->isRecord()) {
- Diag(NewFD->getLocation(), diag::err_function_specialization_in_class)
- << NewFD->getDeclName();
- NewFD->setInvalidDecl();
- return 0;
- } else if (CheckFunctionTemplateSpecialization(NewFD,
- (HasExplicitTemplateArgs ? &TemplateArgs : 0),
- Previous))
+ if (CheckFunctionTemplateSpecialization(NewFD,
+ (HasExplicitTemplateArgs ? &TemplateArgs : 0),
+ Previous))
NewFD->setInvalidDecl();
} else if (isExplicitSpecialization && isa<CXXMethodDecl>(NewFD)) {
if (CheckMemberSpecialization(NewFD, Previous))