Skip to content

Commit e778db6

Browse files
committed
recommit b58f6bb
Add a test for UsedDeclVisitor This test is reduced from mlir/lib/Transforms/AffineDataCopyGeneration.cpp to make sure there is no assertion due to UsedDeclVisitor.
1 parent 2c1ba63 commit e778db6

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// RUN: %clang_cc1 -triple x86_64 -emit-llvm -o %t %s
2+
3+
// Make sure there is no assertion due to UsedDeclVisitor.
4+
5+
struct A {
6+
int a;
7+
};
8+
9+
static A a;
10+
11+
struct B {
12+
B(int b = a.a) {}
13+
};
14+
15+
16+
void foo() {
17+
B();
18+
}

0 commit comments

Comments
 (0)