mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-25 21:26:07 +00:00

ConstStructBuilder::Finalize in CGExprConstant.ccp assumes that the passed in QualType is a RecordType. In some instances, the type is a reference to a RecordType and the reference needs to be removed first. Differential Revision: https://reviews.llvm.org/D117376
15 lines
206 B
C++
15 lines
206 B
C++
// RUN: %clang_cc1 -triple x86_64-linux-gnu -emit-llvm -fmerge-all-constants %s -o /dev/null
|
|
|
|
struct A {
|
|
};
|
|
|
|
struct B {
|
|
const struct A& a = {};
|
|
};
|
|
|
|
void Test(const struct B&);
|
|
|
|
void Run() {
|
|
Test({});
|
|
}
|