File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -215,7 +215,6 @@ class Pointer {
215
215
assert (Offset == PastEndMark && " cannot get base of a block" );
216
216
return Pointer (Pointee, Base, 0 );
217
217
}
218
- assert (Offset == Base && " not an inner field" );
219
218
unsigned NewBase = Base - getInlineDesc ()->Offset ;
220
219
return Pointer (Pointee, NewBase, NewBase);
221
220
}
Original file line number Diff line number Diff line change @@ -22,3 +22,9 @@ int array2[recurse2]; // both-warning {{variable length arrays in C++}} \
22
22
// both-note {{initializer of 'recurse2' is not a constant expression}} \
23
23
// expected-error {{variable length array declaration not allowed at file scope}} \
24
24
// ref-warning {{variable length array folded to constant array as an extension}}
25
+
26
+ struct S {
27
+ int m;
28
+ };
29
+ constexpr S s = { 5 };
30
+ constexpr const int *p = &s.m + 1 ;
You can’t perform that action at this time.
0 commit comments