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 35346a7 commit 95bde80Copy full SHA for 95bde80
lib/Interpreter/CppInterOp.cpp
@@ -1249,8 +1249,12 @@ namespace Cpp {
1249
if (!address)
1250
address = I.getAddressOfGlobal(GD);
1251
if (!address) {
1252
- if (!VD->hasInit())
+ if (!VD->hasInit()) {
1253
+#ifdef USE_CLING
1254
+ cling::Interpreter::PushTransactionRAII RAII(&getInterp());
1255
+#endif // USE_CLING
1256
getSema().InstantiateVariableDefinition(SourceLocation(), VD);
1257
+ }
1258
if (VD->hasInit() &&
1259
(VD->isConstexpr() || VD->getType().isConstQualified())) {
1260
if (const APValue* val = VD->evaluateValue()) {
0 commit comments