From: Anders Carlsson Date: Tue, 13 Oct 2009 22:55:59 +0000 (+0000) Subject: The operator loc points to the operator, not the function decl. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=de699e551062f2b20e66decd4de87ee0804b67cc;p=clang The operator loc points to the operator, not the function decl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84048 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Sema/SemaExprCXX.cpp b/lib/Sema/SemaExprCXX.cpp index 8a67d47954..5f111c8a60 100644 --- a/lib/Sema/SemaExprCXX.cpp +++ b/lib/Sema/SemaExprCXX.cpp @@ -1998,7 +1998,7 @@ Sema::ActOnStartCXXMemberReference(Scope *S, ExprArg Base, SourceLocation OpLoc, if (BaseExpr == NULL) return ExprError(); if (CXXOperatorCallExpr *OpCall = dyn_cast(BaseExpr)) - Locations.push_back(OpCall->getOperatorLoc()); + Locations.push_back(OpCall->getDirectCallee()->getLocation()); BaseType = BaseExpr->getType(); CanQualType CBaseType = Context.getCanonicalType(BaseType); if (!CTypes.insert(CBaseType)) {