]> granicus.if.org Git - clang/commitdiff
DebugInfo: Attribute calls to overloaded operators with the operator, not the start...
authorDavid Blaikie <dblaikie@gmail.com>
Sun, 25 Jan 2015 01:25:37 +0000 (01:25 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Sun, 25 Jan 2015 01:25:37 +0000 (01:25 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@227028 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/ExprCXX.h
lib/CodeGen/CGExpr.cpp
test/CodeGenCXX/debug-info-line.cpp

index 176817823ea96e05d1a2cdd3074eeab8d6e6a5fb..db00445f6897f4349d256ac0c171b78a953e9174 100644 (file)
@@ -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; }
index 3a45d77e2c2e451d4e9530c67ba66c57e91f4f2b..568f949c342ee93410b9335b4945470b6956b463 100644 (file)
@@ -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);
index 340222eba5b7e32f33953b7d707cb7e04e062b6b..a23c242a228b5cf1a27716960653ef5dec807612 100644 (file)
@@ -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