зеркало из https://github.com/microsoft/clang-1.git
Improve source-location information for implicitly-generated member call expressions
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86989 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
aa57614b89
Коммит
00b98c229e
|
@ -95,6 +95,8 @@ public:
|
|||
/// operation would return "x".
|
||||
Expr *getImplicitObjectArgument();
|
||||
|
||||
virtual SourceRange getSourceRange() const;
|
||||
|
||||
static bool classof(const Stmt *T) {
|
||||
return T->getStmtClass() == CXXMemberCallExprClass;
|
||||
}
|
||||
|
|
|
@ -323,6 +323,14 @@ Expr *CXXMemberCallExpr::getImplicitObjectArgument() {
|
|||
return 0;
|
||||
}
|
||||
|
||||
SourceRange CXXMemberCallExpr::getSourceRange() const {
|
||||
SourceLocation LocStart = getCallee()->getLocStart();
|
||||
if (LocStart.isInvalid() && getNumArgs() > 0)
|
||||
LocStart = getArg(0)->getLocStart();
|
||||
return SourceRange(LocStart, getRParenLoc());
|
||||
}
|
||||
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// Named casts
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
|
|
@ -2120,7 +2120,7 @@ CXXMemberCallExpr *Sema::BuildCXXMemberCallExpr(Expr *Exp,
|
|||
CXXMemberCallExpr *CE =
|
||||
new (Context) CXXMemberCallExpr(Context, ME, 0, 0,
|
||||
ResultType,
|
||||
SourceLocation());
|
||||
Exp->getLocEnd());
|
||||
return CE;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче