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