aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaLookup.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-03-13 21:01:28 +0000
committerDouglas Gregor <dgregor@apple.com>2009-03-13 21:01:28 +0000
commitba49817c5b9f502602672861cf369fd0e53966e8 (patch)
tree678a82159237ffb3de940bf8d19e67c9641ddba7 /lib/Sema/SemaLookup.cpp
parente8463ef889be035312c2e40fa318bbbcfce02a3e (diff)
Implement template instantiation for several more kinds of expressions:
- C++ function casts, e.g., T(foo) - sizeof(), alignof() More importantly, this allows us to verify that we're performing overload resolution during template instantiation, with argument-dependent lookup and the "cached" results of name lookup from the template definition. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66947 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaLookup.cpp')
-rw-r--r--lib/Sema/SemaLookup.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Sema/SemaLookup.cpp b/lib/Sema/SemaLookup.cpp
index d391c07b3f..57683b30ec 100644
--- a/lib/Sema/SemaLookup.cpp
+++ b/lib/Sema/SemaLookup.cpp
@@ -1392,6 +1392,9 @@ static bool
IsAcceptableNonMemberOperatorCandidate(FunctionDecl *Fn,
QualType T1, QualType T2,
ASTContext &Context) {
+ if (T1->isDependentType() || (!T2.isNull() && T2->isDependentType()))
+ return true;
+
if (T1->isRecordType() || (!T2.isNull() && T2->isRecordType()))
return true;