File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -3163,6 +3163,10 @@ bool ByteCodeExprGen<Emitter>::VisitDeclRefExpr(const DeclRefExpr *E) {
3163
3163
} else if (const auto *FuncDecl = dyn_cast<FunctionDecl>(D)) {
3164
3164
const Function *F = getFunction (FuncDecl);
3165
3165
return F && this ->emitGetFnPtr (F, E);
3166
+ } else if (isa<TemplateParamObjectDecl>(D)) {
3167
+ if (std::optional<unsigned > Index = P.getOrCreateGlobal (D))
3168
+ return this ->emitGetPtrGlobal (*Index, E);
3169
+ return false ;
3166
3170
}
3167
3171
3168
3172
// References are implemented via pointers, so when we see a DeclRefExpr
Original file line number Diff line number Diff line change @@ -213,3 +213,15 @@ namespace ThisCapture {
213
213
static_assert (F.a == 33 , " " );
214
214
static_assert (F.Aplus2() == (33 + 2 ), " " );
215
215
}
216
+
217
+ namespace GH62611 {
218
+ template <auto A = [](auto x){}>
219
+ struct C {
220
+ static constexpr auto B = A;
221
+ };
222
+
223
+ int test () {
224
+ C<>::B (42 );
225
+ return 0 ;
226
+ }
227
+ }
You can’t perform that action at this time.
0 commit comments