]> granicus.if.org Git - clang/commitdiff
[clang-import-test] Test that enumerators and their values are found.
authorSean Callanan <scallanan@apple.com>
Tue, 11 Jul 2017 00:29:37 +0000 (00:29 +0000)
committerSean Callanan <scallanan@apple.com>
Tue, 11 Jul 2017 00:29:37 +0000 (00:29 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@307603 91177308-0d34-0410-b5e6-96231b3b80d8

test/Import/enum/Inputs/S.cpp [new file with mode: 0644]
test/Import/enum/test.cpp [new file with mode: 0644]

diff --git a/test/Import/enum/Inputs/S.cpp b/test/Import/enum/Inputs/S.cpp
new file mode 100644 (file)
index 0000000..8506c68
--- /dev/null
@@ -0,0 +1,4 @@
+enum E {
+  a = 1,
+  b = 2
+};
diff --git a/test/Import/enum/test.cpp b/test/Import/enum/test.cpp
new file mode 100644 (file)
index 0000000..aa68063
--- /dev/null
@@ -0,0 +1,4 @@
+// RUN: clang-import-test -import %S/Inputs/S.cpp -expression %s
+void expr() {
+  static_assert(E::a + E::b == 3);
+}