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 | 69f6a365d3b42c2d7e39de0d601acfad62173ad1 (patch) | |
| tree | b87b05832dc18cd729962c7273bb2992fc781083 /clang/lib/AST/Decl.cpp | |
| parent | 176a9c4272ea29598cb96622f19fb3f38b895031 (diff) | |
| download | bcm5719-llvm-69f6a365d3b42c2d7e39de0d601acfad62173ad1.tar.gz bcm5719-llvm-69f6a365d3b42c2d7e39de0d601acfad62173ad1.zip | |
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.
llvm-svn: 103948
Diffstat (limited to 'clang/lib/AST/Decl.cpp')
| -rw-r--r-- | clang/lib/AST/Decl.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp index 28332bdb9ab..535bd341794 100644 --- a/clang/lib/AST/Decl.cpp +++ b/clang/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()) { |

