From: Sean Callanan Date: Tue, 11 Jul 2017 00:29:37 +0000 (+0000) Subject: [clang-import-test] Test that enumerators and their values are found. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f269a1475da2024a40956ff038d101ee92cf06f6;p=clang [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 --- 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); +}