aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-09-17 19:51:30 +0000
committerDouglas Gregor <dgregor@apple.com>2009-09-17 19:51:30 +0000
commitd85cef5a54074a5f647f45c2218675f7774a909d (patch)
treec403b5132351f831704082c54f4dda9bb56735ee /lib/Sema/SemaDecl.cpp
parent2bd6b9f298afb16a2aec035ebd7b29af7c5c3da8 (diff)
Merge uninstantiated default arguments more carefully, and try not to
complain about specializations of member functions that are not definitions. Fixes PR4995. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82159 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r--lib/Sema/SemaDecl.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index 9f86f1233f..f5a3dc4252 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -2684,7 +2684,9 @@ Sema::ActOnFunctionDeclarator(Scope* S, Declarator& D, DeclContext* DC,
if (D.getCXXScopeSpec().isSet() && !NewFD->isInvalidDecl()) {
// An out-of-line member function declaration must also be a
// definition (C++ [dcl.meaning]p1).
- if (!IsFunctionDefinition && !isFriend) {
+ // FIXME: Find a better way to recognize out-of-line specializations!
+ if (!IsFunctionDefinition && !isFriend &&
+ !(TemplateParamLists.size() && !FunctionTemplate)) {
Diag(NewFD->getLocation(), diag::err_out_of_line_declaration)
<< D.getCXXScopeSpec().getRange();
NewFD->setInvalidDecl();