r339506 - [ASTImporter] Added test case for opaque enums
Raphael Isemann via cfe-commits
cfe-commits at lists.llvm.org
Sat Aug 11 16:43:46 PDT 2018
Author: teemperor
Date: Sat Aug 11 16:43:46 2018
New Revision: 339506
URL: http://llvm.org/viewvc/llvm-project?rev=339506&view=rev
Log:
[ASTImporter] Added test case for opaque enums
Reviewers: a.sidorin, a_sidorin
Reviewed By: a_sidorin
Subscribers: a_sidorin, martong, cfe-commits
Differential Revision: https://reviews.llvm.org/D50550
Modified:
cfe/trunk/test/Import/enum/Inputs/S.cpp
cfe/trunk/test/Import/enum/test.cpp
Modified: cfe/trunk/test/Import/enum/Inputs/S.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Import/enum/Inputs/S.cpp?rev=339506&r1=339505&r2=339506&view=diff
==============================================================================
--- cfe/trunk/test/Import/enum/Inputs/S.cpp (original)
+++ cfe/trunk/test/Import/enum/Inputs/S.cpp Sat Aug 11 16:43:46 2018
@@ -2,3 +2,5 @@ enum E {
a = 1,
b = 2
};
+
+enum OpaqueWithType : long;
Modified: cfe/trunk/test/Import/enum/test.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Import/enum/test.cpp?rev=339506&r1=339505&r2=339506&view=diff
==============================================================================
--- cfe/trunk/test/Import/enum/test.cpp (original)
+++ cfe/trunk/test/Import/enum/test.cpp Sat Aug 11 16:43:46 2018
@@ -1,4 +1,8 @@
-// RUN: clang-import-test -import %S/Inputs/S.cpp -expression %s
+// RUN: clang-import-test -dump-ast -import %S/Inputs/S.cpp -expression %s | FileCheck %s
+
+// CHECK: OpaqueWithType 'long'
+
void expr() {
static_assert(E::a + E::b == 3);
+ static_assert(sizeof(OpaqueWithType) == sizeof(long));
}
More information about the cfe-commits
mailing list