|
1 |
| -// RUN: %clang_cc1 -std=gnu++98 %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s |
| 1 | +// RUN: %clang_cc1 -Wno-objc-root-class -std=gnu++98 %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck --check-prefixes CHECK,CHECKCXX98 %s |
| 2 | +// RUN: %clang_cc1 -Wno-objc-root-class -std=gnu++20 %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck --check-prefixes CHECK,CHECKCXX20 %s |
2 | 3 |
|
3 | 4 | // CHECK: v17@0:8{vector<float, float, float>=}16
|
4 | 5 | // CHECK: {vector<float, float, float>=}
|
@@ -87,7 +88,9 @@ @implementation RedBalloonHGXFormWrapper
|
87 | 88 |
|
88 | 89 | typedef vector< float, fixed<4> > vector4f;
|
89 | 90 |
|
90 |
| - // CHECK: @_ZN11rdar93574002ggE = constant [49 x i8] c"{vector<float, rdar9357400::fixed<4, -1> >=[4f]}\00" |
| 91 | + // FIXME: This difference is due to D76801. It was probably an unintentional change. Maybe we want to undo it? |
| 92 | + // CHECKCXX98: @_ZN11rdar93574002ggE = constant [49 x i8] c"{vector<float, rdar9357400::fixed<4, -1> >=[4f]}\00" |
| 93 | + // CHECKCXX20: @_ZN11rdar93574002ggE = constant [48 x i8] c"{vector<float, rdar9357400::fixed<4, -1>>=[4f]}\00" |
91 | 94 | extern const char gg[] = @encode(vector4f);
|
92 | 95 | }
|
93 | 96 |
|
@@ -170,21 +173,21 @@ @implementation RedBalloonHGXFormWrapper
|
170 | 173 |
|
171 | 174 |
|
172 | 175 | // PR10990
|
173 |
| -class CefBase { |
| 176 | +struct CefBase { |
174 | 177 | virtual ~CefBase() {}
|
175 | 178 | };
|
176 |
| -class CefBrowser : public virtual CefBase {}; |
177 |
| -class CefBrowserImpl : public CefBrowser {}; |
| 179 | +struct CefBrowser : public virtual CefBase {}; |
| 180 | +struct CefBrowserImpl : public CefBrowser {}; |
178 | 181 | // CHECK: @g6 = constant [21 x i8] c"{CefBrowserImpl=^^?}\00"
|
179 | 182 | extern const char g6[] = @encode(CefBrowserImpl);
|
180 | 183 |
|
181 | 184 | // PR10990_2
|
182 |
| -class CefBase2 { |
| 185 | +struct CefBase2 { |
183 | 186 | virtual ~CefBase2() {}
|
184 | 187 | int i;
|
185 | 188 | };
|
186 |
| -class CefBrowser2 : public virtual CefBase2 {}; |
187 |
| -class CefBrowserImpl2 : public CefBrowser2 {}; |
| 189 | +struct CefBrowser2 : public virtual CefBase2 {}; |
| 190 | +struct CefBrowserImpl2 : public CefBrowser2 {}; |
188 | 191 | // CHECK: @g7 = constant [26 x i8] c"{CefBrowserImpl2=^^?^^?i}\00"
|
189 | 192 | extern const char g7[] = @encode(CefBrowserImpl2);
|
190 | 193 |
|
@@ -245,3 +248,15 @@ @implementation N
|
245 | 248 | // CHECK: @{{.*}} = private unnamed_addr constant [13 x i8] c"{N={S<N>=@}}\00"
|
246 | 249 | return @encode(N);
|
247 | 250 | }
|
| 251 | + |
| 252 | +#if __cplusplus >= 202002L |
| 253 | +namespace PR48048 { |
| 254 | + struct F {}; |
| 255 | + struct I { |
| 256 | + int m; |
| 257 | + [[no_unique_address]] F n; |
| 258 | + }; |
| 259 | + // CHECKCXX20: @_ZN7PR480481xE = constant [6 x i8] c"{I=i}\00" |
| 260 | + extern const char x[] = @encode(I); |
| 261 | +} |
| 262 | +#endif |
0 commit comments