From 0950e41b73587a71ee66c88cf8db0dfff343a8cf Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Fri, 13 Mar 2009 21:01:28 +0000 Subject: 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. llvm-svn: 66947 --- clang/lib/Sema/SemaLookup.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'clang/lib/Sema/SemaLookup.cpp') diff --git a/clang/lib/Sema/SemaLookup.cpp b/clang/lib/Sema/SemaLookup.cpp index d391c07b3f0..57683b30ecd 100644 --- a/clang/lib/Sema/SemaLookup.cpp +++ b/clang/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; -- cgit v1.2.3