File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -2152,12 +2152,11 @@ bool ByteCodeExprGen<Emitter>::VisitCXXMemberCallExpr(
2152
2152
template <class Emitter >
2153
2153
bool ByteCodeExprGen<Emitter>::VisitCXXDefaultInitExpr(
2154
2154
const CXXDefaultInitExpr *E) {
2155
-
2155
+ SourceLocScope<Emitter> SLS ( this , E);
2156
2156
if (Initializing)
2157
2157
return this ->visitInitializer (E->getExpr ());
2158
2158
2159
2159
assert (classify (E->getType ()));
2160
- SourceLocScope<Emitter> SLS (this , E);
2161
2160
return this ->visit (E->getExpr ());
2162
2161
}
2163
2162
Original file line number Diff line number Diff line change @@ -248,4 +248,15 @@ namespace SourceLocation {
248
248
};
249
249
250
250
static_assert (Foo{}.a == __LINE__, " " );
251
+
252
+ struct AA {
253
+ int n = __builtin_LINE();
254
+ };
255
+ struct B {
256
+ AA a = {};
257
+ };
258
+ constexpr void f () {
259
+ constexpr B c = {};
260
+ static_assert (c.a .n == __LINE__ - 1 , " " );
261
+ }
251
262
}
You can’t perform that action at this time.
0 commit comments