diff options
author | Douglas Gregor <dgregor@apple.com> | 2013-04-10 05:18:00 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2013-04-10 05:18:00 +0000 |
commit | 7e0c22714e4750a2f730035957f9bb678ae681c0 (patch) | |
tree | bad2968a9fc93a219ac6cfc9faaaf41483a50da3 /lib/Sema/SemaLookup.cpp | |
parent | 03409967bd9860ffb2ff6b38126e04493c55567f (diff) |
<rdar://problem/13605348> Don't consider invalid user-defined literal operators during overload resolution.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179150 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaLookup.cpp')
-rw-r--r-- | lib/Sema/SemaLookup.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Sema/SemaLookup.cpp b/lib/Sema/SemaLookup.cpp index b631d8b930..eab2d81f39 100644 --- a/lib/Sema/SemaLookup.cpp +++ b/lib/Sema/SemaLookup.cpp @@ -2582,6 +2582,12 @@ Sema::LookupLiteralOperator(Scope *S, LookupResult &R, bool IsRaw = false; bool IsExactMatch = false; + // If the declaration we found is invalid, skip it. + if (D->isInvalidDecl()) { + F.erase(); + continue; + } + if (FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) { if (FD->getNumParams() == 1 && FD->getParamDecl(0)->getType()->getAs<PointerType>()) |