[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

llvm-svn: 339506
This commit is contained in:
Raphael Isemann 2018-08-11 23:43:46 +00:00
parent 30e0c43c17
commit 612c524a90
2 changed files with 7 additions and 1 deletions

View File

@ -2,3 +2,5 @@ enum E {
a = 1,
b = 2
};
enum OpaqueWithType : long;

View File

@ -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));
}