forked from OSchip/llvm-project
recommit b58f6bb120
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.
This commit is contained in:
parent
2c1ba63ede
commit
e778db6d72
|
@ -0,0 +1,18 @@
|
|||
// RUN: %clang_cc1 -triple x86_64 -emit-llvm -o %t %s
|
||||
|
||||
// Make sure there is no assertion due to UsedDeclVisitor.
|
||||
|
||||
struct A {
|
||||
int a;
|
||||
};
|
||||
|
||||
static A a;
|
||||
|
||||
struct B {
|
||||
B(int b = a.a) {}
|
||||
};
|
||||
|
||||
|
||||
void foo() {
|
||||
B();
|
||||
}
|
Loading…
Reference in New Issue