summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/Decl.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-05-17 17:34:56 +0000
committerDouglas Gregor <dgregor@apple.com>2010-05-17 17:34:56 +0000
commit69f6a365d3b42c2d7e39de0d601acfad62173ad1 (patch)
treeb87b05832dc18cd729962c7273bb2992fc781083 /clang/lib/AST/Decl.cpp
parent176a9c4272ea29598cb96622f19fb3f38b895031 (diff)
downloadbcm5719-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.cpp5
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()) {
OpenPOWER on IntegriCloud