r307603 - [clang-import-test] Test that enumerators and their values are found.
Sean Callanan via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 10 17:29:37 PDT 2017
Author: spyffe
Date: Mon Jul 10 17:29:37 2017
New Revision: 307603
URL: http://llvm.org/viewvc/llvm-project?rev=307603&view=rev
Log:
[clang-import-test] Test that enumerators and their values are found.
Added:
cfe/trunk/test/Import/enum/
- copied from r307452, cfe/trunk/test/Import/member-in-struct/
cfe/trunk/test/Import/enum/Inputs/S.cpp
- copied, changed from r307452, cfe/trunk/test/Import/member-in-struct/Inputs/S.c
cfe/trunk/test/Import/enum/test.cpp
- copied, changed from r307452, cfe/trunk/test/Import/member-in-struct/test.c
Removed:
cfe/trunk/test/Import/enum/Inputs/S.c
cfe/trunk/test/Import/enum/test.c
Removed: cfe/trunk/test/Import/enum/Inputs/S.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Import/member-in-struct/Inputs/S.c?rev=307452&view=auto
==============================================================================
--- cfe/trunk/test/Import/enum/Inputs/S.c (original)
+++ cfe/trunk/test/Import/enum/Inputs/S.c (removed)
@@ -1,3 +0,0 @@
-struct S {
- int a;
-};
Copied: cfe/trunk/test/Import/enum/Inputs/S.cpp (from r307452, cfe/trunk/test/Import/member-in-struct/Inputs/S.c)
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Import/enum/Inputs/S.cpp?p2=cfe/trunk/test/Import/enum/Inputs/S.cpp&p1=cfe/trunk/test/Import/member-in-struct/Inputs/S.c&r1=307452&r2=307603&rev=307603&view=diff
==============================================================================
--- cfe/trunk/test/Import/member-in-struct/Inputs/S.c (original)
+++ cfe/trunk/test/Import/enum/Inputs/S.cpp Mon Jul 10 17:29:37 2017
@@ -1,3 +1,4 @@
-struct S {
- int a;
+enum E {
+ a = 1,
+ b = 2
};
Removed: cfe/trunk/test/Import/enum/test.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Import/member-in-struct/test.c?rev=307452&view=auto
==============================================================================
--- cfe/trunk/test/Import/enum/test.c (original)
+++ cfe/trunk/test/Import/enum/test.c (removed)
@@ -1,5 +0,0 @@
-// RUN: clang-import-test -import %S/Inputs/S.c -expression %s
-void expr() {
- struct S MyS;
- MyS.a = 3;
-}
Copied: cfe/trunk/test/Import/enum/test.cpp (from r307452, cfe/trunk/test/Import/member-in-struct/test.c)
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Import/enum/test.cpp?p2=cfe/trunk/test/Import/enum/test.cpp&p1=cfe/trunk/test/Import/member-in-struct/test.c&r1=307452&r2=307603&rev=307603&view=diff
==============================================================================
--- cfe/trunk/test/Import/member-in-struct/test.c (original)
+++ cfe/trunk/test/Import/enum/test.cpp Mon Jul 10 17:29:37 2017
@@ -1,5 +1,4 @@
-// RUN: clang-import-test -import %S/Inputs/S.c -expression %s
+// RUN: clang-import-test -import %S/Inputs/S.cpp -expression %s
void expr() {
- struct S MyS;
- MyS.a = 3;
+ static_assert(E::a + E::b == 3);
}
More information about the cfe-commits
mailing list