diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-05-17 17:34:56 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-05-17 17:34:56 +0000 |
commit | 6cfacfe54c75baa4d67f1fbdf4f80644b662818e (patch) | |
tree | ff0d6070954b892bbb06d57e48474e0989dff700 /lib/AST/Decl.cpp | |
parent | e32b9b854e5b92b223c553164d3ecfbf657dbbf2 (diff) |
Determine when the instantiation of a friend function defined inside a
class template conflicts with an existing (non-template)
definition. This is another part of PR6952.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103948 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Decl.cpp')
-rw-r--r-- | lib/AST/Decl.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp index 28332bdb9a..535bd34179 100644 --- a/lib/AST/Decl.cpp +++ b/lib/AST/Decl.cpp @@ -1219,9 +1219,8 @@ FunctionDecl::setInstantiationOfMemberFunction(FunctionDecl *FD, } bool FunctionDecl::isImplicitlyInstantiable() const { - // If this function already has a definition or is invalid, it can't be - // implicitly instantiated. - if (isInvalidDecl() || getBody()) + // If the function is invalid, it can't be implicitly instantiated. + if (isInvalidDecl()) return false; switch (getTemplateSpecializationKind()) { |