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.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/debug-info-line.cpp b/clang/test/CodeGenCXX/debug-info-line.cpp
new file mode 100644
index 00000000000..0434de5e102
--- /dev/null
+++ b/clang/test/CodeGenCXX/debug-info-line.cpp
@@ -0,0 +1,26 @@
+// RUN: %clang_cc1 -g -std=c++11 -S -emit-llvm %s -o - | FileCheck %s
+
+int src(); int* sink();
+
+void f1() {
+#line 100
+ * // The store for the assignment should be attributed to the start of the
+ // assignment expression here, regardless of the location of subexpressions.
+ (
+ sink
+ (
+ )
+ +
+ 3
+ )
+ =
+ src
+ (
+ )
+ +
+ 42
+ ;
+ // CHECK: store {{.*}}, !dbg [[DBG1:!.*]]
+}
+
+// CHECK: [[DBG1]] = metadata !{i32 100, {{.*}}
OpenPOWER on IntegriCloud