summaryrefslogtreecommitdiff
path: root/test/Import
diff options
context:
space:
mode:
authorSean Callanan <scallanan@apple.com>2017-07-11 00:29:37 +0000
committerSean Callanan <scallanan@apple.com>2017-07-11 00:29:37 +0000
commitf269a1475da2024a40956ff038d101ee92cf06f6 (patch)
tree06e6a19319f416c167e95498a307ab0df9ae1ef3 /test/Import
parent3fb38ea0fb8cb74aae8d3054326682bdd34ae755 (diff)
[clang-import-test] Test that enumerators and their values are found.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@307603 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Import')
-rw-r--r--test/Import/enum/Inputs/S.cpp4
-rw-r--r--test/Import/enum/test.cpp4
2 files changed, 8 insertions, 0 deletions
diff --git a/test/Import/enum/Inputs/S.cpp b/test/Import/enum/Inputs/S.cpp
new file mode 100644
index 0000000000..8506c68512
--- /dev/null
+++ b/test/Import/enum/Inputs/S.cpp
@@ -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
index 0000000000..aa68063cb2
--- /dev/null
+++ b/test/Import/enum/test.cpp
@@ -0,0 +1,4 @@
+// RUN: clang-import-test -import %S/Inputs/S.cpp -expression %s
+void expr() {
+ static_assert(E::a + E::b == 3);
+}