]> granicus.if.org Git - clang/commitdiff
The operator loc points to the operator, not the function decl.
authorAnders Carlsson <andersca@mac.com>
Tue, 13 Oct 2009 22:55:59 +0000 (22:55 +0000)
committerAnders Carlsson <andersca@mac.com>
Tue, 13 Oct 2009 22:55:59 +0000 (22:55 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84048 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaExprCXX.cpp

index 8a67d479543803dfc8f628352055eb946dffeac8..5f111c8a60e7a9c0892d6b43d94605c7c49762df 100644 (file)
@@ -1998,7 +1998,7 @@ Sema::ActOnStartCXXMemberReference(Scope *S, ExprArg Base, SourceLocation OpLoc,
       if (BaseExpr == NULL)
         return ExprError();
       if (CXXOperatorCallExpr *OpCall = dyn_cast<CXXOperatorCallExpr>(BaseExpr))
-        Locations.push_back(OpCall->getOperatorLoc());
+        Locations.push_back(OpCall->getDirectCallee()->getLocation());
       BaseType = BaseExpr->getType();
       CanQualType CBaseType = Context.getCanonicalType(BaseType);
       if (!CTypes.insert(CBaseType)) {