aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/ASTContext.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-05-21 22:16:50 +0000
committerDouglas Gregor <dgregor@apple.com>2011-05-21 22:16:50 +0000
commit9625e44c0252485277a340746ed8ac950686156f (patch)
treeb20c22d1865010aa471ce9fb12e59c0b2b909c05 /lib/AST/ASTContext.cpp
parentb0844c6f07d8c9c6c9c3095201879593611b9e79 (diff)
It's considered poor form to create references to the overloaded
function type. Educate template argument deduction thusly, fixing PR9974 / <rdar://problem/9479155>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131811 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/ASTContext.cpp')
-rw-r--r--lib/AST/ASTContext.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp
index b0303797e4..e664855067 100644
--- a/lib/AST/ASTContext.cpp
+++ b/lib/AST/ASTContext.cpp
@@ -1423,6 +1423,9 @@ QualType ASTContext::getBlockPointerType(QualType T) const {
/// lvalue reference to the specified type.
QualType
ASTContext::getLValueReferenceType(QualType T, bool SpelledAsLValue) const {
+ assert(getCanonicalType(T) != OverloadTy &&
+ "Unresolved overloaded function type");
+
// Unique pointers, to guarantee there is only one pointer of a particular
// structure.
llvm::FoldingSetNodeID ID;