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 4b483ec commit a2535a5Copy full SHA for a2535a5
clang/lib/AST/Interp/EvalEmitter.cpp
@@ -152,7 +152,6 @@ template <> bool EvalEmitter::emitRet<PT_FnPtr>(const SourceInfo &Info) {
152
if (!isActive())
153
return true;
154
// Function pointers cannot be converted to rvalues.
155
- assert(!ConvertResultToRValue);
156
EvalResult.setFunctionPointer(S.Stk.pop<FunctionPointer>());
157
158
}
clang/test/AST/Interp/comma.cpp
@@ -0,0 +1,10 @@
1
+// RUN: %clang_cc1 -fsyntax-only -verify %s
2
+// RUN: %clang_cc1 -fsyntax-only -verify %s -fexperimental-new-constant-interpreter
3
+// expected-no-diagnostics
4
+
5
+// PR6076
6
+void f();
7
+void (&g)() = (void(), f);
8
9
+int a[1];
10
+int (&b)[1] = (void(), a);
0 commit comments