]> granicus.if.org Git - clang/commitdiff
Test case for r18266 (serialization support for TagDecl:IsCompleteDefinitionRequired)
authorDavid Blaikie <dblaikie@gmail.com>
Mon, 15 Jul 2013 21:33:26 +0000 (21:33 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Mon, 15 Jul 2013 21:33:26 +0000 (21:33 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186351 91177308-0d34-0410-b5e6-96231b3b80d8

test/PCH/debug-info-limited-struct.c [new file with mode: 0644]
test/PCH/debug-info-limited-struct.h [new file with mode: 0644]

diff --git a/test/PCH/debug-info-limited-struct.c b/test/PCH/debug-info-limited-struct.c
new file mode 100644 (file)
index 0000000..9d0ed26
--- /dev/null
@@ -0,0 +1,4 @@
+// RUN: %clang_cc1 -emit-pch -o %t %S/debug-info-limited-struct.h
+// RUN: %clang_cc1 -include-pch %t -emit-llvm %s -g -o - | FileCheck %s
+
+// CHECK-DAG: [ DW_TAG_structure_type ] [foo] {{.*}} [def]
diff --git a/test/PCH/debug-info-limited-struct.h b/test/PCH/debug-info-limited-struct.h
new file mode 100644 (file)
index 0000000..593e722
--- /dev/null
@@ -0,0 +1,8 @@
+struct foo {
+  int i;
+};
+
+void func() {
+  struct foo *f;
+  f->i = 3;
+}