[PATCH] D50550: [ASTImporter] Added test case for opaque enums
Raphael Isemann via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 9 22:04:51 PDT 2018
teemperor created this revision.
Herald added a subscriber: martong.
Herald added a reviewer: a.sidorin.
Repository:
rC Clang
https://reviews.llvm.org/D50550
Files:
test/Import/enum/Inputs/S.cpp
test/Import/enum/test.cpp
Index: test/Import/enum/test.cpp
===================================================================
--- test/Import/enum/test.cpp
+++ test/Import/enum/test.cpp
@@ -1,4 +1,9 @@
-// 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'
+// CHECK-SANE: EnumDecl
+
void expr() {
static_assert(E::a + E::b == 3);
+ static_assert(sizeof(OpaqueWithType) == sizeof(long));
}
Index: test/Import/enum/Inputs/S.cpp
===================================================================
--- test/Import/enum/Inputs/S.cpp
+++ test/Import/enum/Inputs/S.cpp
@@ -2,3 +2,5 @@
a = 1,
b = 2
};
+
+enum OpaqueWithType : long;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50550.160056.patch
Type: text/x-patch
Size: 751 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180810/3f9777ec/attachment.bin>
More information about the cfe-commits
mailing list