Skip to content

Commit

Permalink
[clang][Interp] Fix initializing PredefinedExprs
Browse files Browse the repository at this point in the history
  • Loading branch information
tbaederr committed Feb 9, 2024
1 parent 3902f9b commit 2cb61a1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 1 addition & 2 deletions clang/lib/AST/Interp/ByteCodeExprGen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1750,8 +1750,7 @@ bool ByteCodeExprGen<Emitter>::VisitPredefinedExpr(const PredefinedExpr *E) {
if (DiscardResult)
return true;

assert(!Initializing);
return this->visit(E->getFunctionName());
return this->delegate(E->getFunctionName());
}

template <class Emitter>
Expand Down
1 change: 1 addition & 0 deletions clang/test/Sema/ms_predefined_expr.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// RUN: %clang_cc1 %s -fsyntax-only -Wmicrosoft -verify -fms-extensions
// RUN: %clang_cc1 %s -fsyntax-only -Wmicrosoft -verify -fms-extensions -fexperimental-new-constant-interpreter

using size_t = __SIZE_TYPE__;

Expand Down

0 comments on commit 2cb61a1

Please sign in to comment.