We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fcf3ca9 commit d61864fCopy full SHA for d61864f
clang/lib/AST/Interp/Program.cpp
@@ -232,6 +232,9 @@ Record *Program::getOrCreateRecord(const RecordDecl *RD) {
232
if (!RD)
233
return nullptr;
234
235
+ if (!RD->isCompleteDefinition())
236
+ return nullptr;
237
+
238
// Deduplicate records.
239
if (auto It = Records.find(RD); It != Records.end())
240
return It->second;
clang/test/AST/Interp/lambda.cpp
@@ -222,3 +222,16 @@ namespace GH62611 {
222
return 0;
223
}
224
225
226
+namespace LambdaToAPValue {
227
+ void wrapper() {
228
+ constexpr auto f = []() constexpr {
229
+ return 0;
230
+ };
231
+ constexpr auto g = [f]() constexpr {
+ return f();
+ static_assert(g() == f(), "");
+ }
+}
0 commit comments