blob: 9469c84eb5d04391c8b23397b0fcee8add3df08a [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 -emit-llvm-only -verify %s
Eli Friedman03981012009-12-11 02:42:07 +00002
3struct XPTParamDescriptor {};
4struct nsXPTParamInfo {
5 nsXPTParamInfo(const XPTParamDescriptor& desc);
6};
7void a(XPTParamDescriptor *params) {
8 const nsXPTParamInfo& paramInfo = params[0];
9}
Chandler Carruth5535c382010-01-12 20:32:25 +000010
11// CodeGen of reference initialized const arrays.
12namespace PR5911 {
13 template <typename T, int N> int f(const T (&a)[N]) { return N; }
14 int iarr[] = { 1 };
15 int test() { return f(iarr); }
16}
Fariborz Jahanianf7c00ed2010-01-25 18:30:26 +000017
18// radar 7574896
19struct Foo { int foo; };
20Foo& ignoreSetMutex = *(new Foo);
21
Douglas Gregorde4b1d82010-01-29 19:14:02 +000022// Binding to a bit-field that requires a temporary.
23struct { int bitfield : 3; } s = { 3 };
24const int &s2 = s.bitfield;