xref: /llvm-project/clang/test/AST/dynamic-alloc-lvalue.cpp (revision 2e7d711a106170185e9bbbf15115613d9a5854c5)
1*2e7d711aSNathan Ridge // RUN: %clang_cc1 -emit-pch -o %t %s
2*2e7d711aSNathan Ridge 
3*2e7d711aSNathan Ridge // Test that serialization/deserialization of a DynamicAllocLValue
4*2e7d711aSNathan Ridge // variant of APValue does not crash.
5*2e7d711aSNathan Ridge 
6*2e7d711aSNathan Ridge #ifndef HEADER
7*2e7d711aSNathan Ridge #define HEADER
8*2e7d711aSNathan Ridge 
9*2e7d711aSNathan Ridge struct A {  int *p; };
10*2e7d711aSNathan Ridge const A &w = A{ new int(10) };
11*2e7d711aSNathan Ridge 
12*2e7d711aSNathan Ridge #endif
13