Template instantiation for array subscript expressions. This was far
easier than expected because of the limitation that subscript
operators must be member functions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72076 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaOverload.cpp b/lib/Sema/SemaOverload.cpp
index 90da96b..ef17531 100644
--- a/lib/Sema/SemaOverload.cpp
+++ b/lib/Sema/SemaOverload.cpp
@@ -2402,7 +2402,8 @@
T2 = Args[1]->getType();
DeclarationName OpName = Context.DeclarationNames.getCXXOperatorName(Op);
- LookupOverloadedOperatorName(Op, S, T1, T2, Functions);
+ if (S)
+ LookupOverloadedOperatorName(Op, S, T1, T2, Functions);
ArgumentDependentLookup(OpName, Args, NumArgs, Functions);
AddFunctionCandidates(Functions, Args, NumArgs, CandidateSet);
AddMemberOperatorCandidates(Op, OpLoc, Args, NumArgs, CandidateSet, OpRange);