diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-11-13 23:14:53 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-11-13 23:14:53 +0000 |
commit | 5f235a21ebd36fbd32bf8249afb81b46eb569fac (patch) | |
tree | 2fde83b998a4e7b7357b5e110d11869ccc00913c /clang/lib/Sema/SemaOverload.cpp | |
parent | 559387fe8b742ee4f5379e0a0f968f6921c70ec7 (diff) | |
download | bcm5719-llvm-5f235a21ebd36fbd32bf8249afb81b46eb569fac.tar.gz bcm5719-llvm-5f235a21ebd36fbd32bf8249afb81b46eb569fac.zip |
A constructor template cannot be instantiated to a copy
constructor. Make sure that such declarations can never be formed.
llvm-svn: 88718
Diffstat (limited to 'clang/lib/Sema/SemaOverload.cpp')
-rw-r--r-- | clang/lib/Sema/SemaOverload.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaOverload.cpp b/clang/lib/Sema/SemaOverload.cpp index 3948b22f7b6..70b080e678d 100644 --- a/clang/lib/Sema/SemaOverload.cpp +++ b/clang/lib/Sema/SemaOverload.cpp @@ -2237,7 +2237,9 @@ Sema::AddOverloadCandidate(FunctionDecl *Function, // argument doesn't participate in overload resolution. } - if (!CandidateSet.isNewCandidate(Function)) + // FIXME: It would be nice if it were safe to keep invalid methods in the + // overload set (but it isn't due to broken copy constructors). + if (!CandidateSet.isNewCandidate(Function) || Function->isInvalidDecl()) return; // Add this candidate |