summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/debug-info-line.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/CodeGenCXX/debug-info-line.cpp')
-rw-r--r--clang/test/CodeGenCXX/debug-info-line.cpp42
1 files changed, 42 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/debug-info-line.cpp b/clang/test/CodeGenCXX/debug-info-line.cpp
index a23c242a228..af78f23c0e5 100644
--- a/clang/test/CodeGenCXX/debug-info-line.cpp
+++ b/clang/test/CodeGenCXX/debug-info-line.cpp
@@ -213,6 +213,43 @@ void f17(int *x) {
x[1];
}
+// CHECK-LABEL: define
+void f18(int a, int b) {
+// CHECK: icmp {{.*}}, !dbg [[DBG_F18_1:![0-9]*]]
+// CHECK: br {{.*}}, !dbg [[DBG_F18_2:![0-9]*]]
+#line 2000
+ if (a //
+ && //
+ b)
+ ;
+}
+
+// CHECK-LABEL: define
+void f19(int a, int b) {
+// CHECK: icmp {{.*}}, !dbg [[DBG_F19_1:![0-9]*]]
+// CHECK: br {{.*}}, !dbg [[DBG_F19_2:![0-9]*]]
+#line 2100
+ if (a //
+ || //
+ b)
+ ;
+}
+
+// CHECK-LABEL: define
+void f20(int a, int b, int c) {
+// CHECK: icmp {{.*}}, !dbg [[DBG_F20_1:![0-9]*]]
+// FIXME: Conditional operator's exprloc should be the '?' not the start of the
+// expression, then this would go in the right place. (but adding getExprLoc to
+// the ConditionalOperator breaks the ARC migration tool - need to investigate
+// further).
+// CHECK: br {{.*}}, !dbg [[DBG_F20_1]]
+#line 2200
+ if (a //
+ ? //
+ b : c)
+ ;
+}
+
// CHECK: [[DBG_F1]] = !MDLocation(line: 100,
// CHECK: [[DBG_FOO_VALUE]] = !MDLocation(line: 200,
// CHECK: [[DBG_FOO_REF]] = !MDLocation(line: 202,
@@ -236,3 +273,8 @@ void f17(int *x) {
// CHECK: [[DBG_F15]] = !MDLocation(line: 1700,
// CHECK: [[DBG_F16]] = !MDLocation(line: 1800,
// CHECK: [[DBG_F17]] = !MDLocation(line: 1900,
+// CHECK: [[DBG_F18_1]] = !MDLocation(line: 2000,
+// CHECK: [[DBG_F18_2]] = !MDLocation(line: 2001,
+// CHECK: [[DBG_F19_1]] = !MDLocation(line: 2100,
+// CHECK: [[DBG_F19_2]] = !MDLocation(line: 2101,
+// CHECK: [[DBG_F20_1]] = !MDLocation(line: 2200,
OpenPOWER on IntegriCloud