Skip to content

Commit 2cb61a1

Browse files
committed
[clang][Interp] Fix initializing PredefinedExprs
1 parent 3902f9b commit 2cb61a1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

clang/lib/AST/Interp/ByteCodeExprGen.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1750,8 +1750,7 @@ bool ByteCodeExprGen<Emitter>::VisitPredefinedExpr(const PredefinedExpr *E) {
17501750
if (DiscardResult)
17511751
return true;
17521752

1753-
assert(!Initializing);
1754-
return this->visit(E->getFunctionName());
1753+
return this->delegate(E->getFunctionName());
17551754
}
17561755

17571756
template <class Emitter>

clang/test/Sema/ms_predefined_expr.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// RUN: %clang_cc1 %s -fsyntax-only -Wmicrosoft -verify -fms-extensions
2+
// RUN: %clang_cc1 %s -fsyntax-only -Wmicrosoft -verify -fms-extensions -fexperimental-new-constant-interpreter
23

34
using size_t = __SIZE_TYPE__;
45

0 commit comments

Comments
 (0)