From: David Blaikie Date: Sun, 25 Jan 2015 01:25:37 +0000 (+0000) Subject: DebugInfo: Attribute calls to overloaded operators with the operator, not the start... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f0fc9d7a7bf0f9787cc2ead1ef00dcb603dd1132;p=clang DebugInfo: Attribute calls to overloaded operators with the operator, not the start of the whole expression git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@227028 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/AST/ExprCXX.h b/include/clang/AST/ExprCXX.h index 176817823e..db00445f68 100644 --- a/include/clang/AST/ExprCXX.h +++ b/include/clang/AST/ExprCXX.h @@ -86,6 +86,8 @@ public: /// of the right bracket. SourceLocation getOperatorLoc() const { return getRParenLoc(); } + SourceLocation getExprLoc() const LLVM_READONLY { return getOperatorLoc(); } + SourceLocation getLocStart() const LLVM_READONLY { return Range.getBegin(); } SourceLocation getLocEnd() const LLVM_READONLY { return Range.getEnd(); } SourceRange getSourceRange() const { return Range; } diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp index 3a45d77e2c..568f949c34 100644 --- a/lib/CodeGen/CGExpr.cpp +++ b/lib/CodeGen/CGExpr.cpp @@ -3060,8 +3060,6 @@ RValue CodeGenFunction::EmitRValueForField(LValue LV, RValue CodeGenFunction::EmitCallExpr(const CallExpr *E, ReturnValueSlot ReturnValue) { - ApplyDebugLocation DL(*this, E); - // Builtins never have block type. if (E->getCallee()->getType()->isBlockPointerType()) return EmitBlockCallExpr(E, ReturnValue); diff --git a/test/CodeGenCXX/debug-info-line.cpp b/test/CodeGenCXX/debug-info-line.cpp index 340222eba5..a23c242a22 100644 --- a/test/CodeGenCXX/debug-info-line.cpp +++ b/test/CodeGenCXX/debug-info-line.cpp @@ -74,9 +74,11 @@ agg agg_src(); // CHECK-LABEL: define void f6() { agg x; + // CHECK: call void @llvm.memcpy{{.*}} !dbg [[DBG_F6:!.*]] + x #line 700 - x // CHECK: call void @llvm.memcpy{{.*}} !dbg [[DBG_F6:!.*]] - = agg_src(); + = // + agg_src(); } // CHECK-LABEL: define