]> granicus.if.org Git - clang/commitdiff
[libclang] Add a libclang test I neglected to commit.
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Thu, 9 Feb 2012 18:31:22 +0000 (18:31 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Thu, 9 Feb 2012 18:31:22 +0000 (18:31 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150193 91177308-0d34-0410-b5e6-96231b3b80d8

test/Index/index-suppress-refs.cpp [new file with mode: 0644]
test/Index/index-suppress-refs.hpp [new file with mode: 0644]

diff --git a/test/Index/index-suppress-refs.cpp b/test/Index/index-suppress-refs.cpp
new file mode 100644 (file)
index 0000000..113dd40
--- /dev/null
@@ -0,0 +1,12 @@
+
+#include "index-suppress-refs.hpp"
+
+class Sub : B1, B2 {
+  typedef B1 Base1;
+  typedef B2 Base2;
+};
+
+// RUN: env CINDEXTEST_SUPPRESSREFS=1 c-index-test -index-file %s | FileCheck %s
+// CHECK:      [indexDeclaration]: kind: c++-class | name: Sub
+// CHECK-NOT:  [indexEntityReference]: kind: c++-class | name: B1
+// CHECK-NOT:  [indexEntityReference]: kind: c++-class | name: B2
diff --git a/test/Index/index-suppress-refs.hpp b/test/Index/index-suppress-refs.hpp
new file mode 100644 (file)
index 0000000..4aab08b
--- /dev/null
@@ -0,0 +1,3 @@
+
+class B1 {};
+class B2 {};