1//===--------------------------- EvalSettings.h -----------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef LLVM_CLANG_AST_INTERP_EVALSETTINGS_H
10#define LLVM_CLANG_AST_INTERP_EVALSETTINGS_H
11
12#include "State.h"
13
14namespace clang {
15namespace interp {
16
17struct EvalSettings {
18 Expr::EvalStatus &EvalStatus;
19 const EvaluationMode EvalMode;
20 const ConstantExprKind ConstexprKind;
21
22 SemaProxy *SProxy;
23
24 bool InConstantContext = false;
25 bool CheckingPotentialConstantExpression = false;
26 bool CheckingForUndefinedBehavior = false;
27
28 EvalSettings(EvaluationMode EvalMode, Expr::EvalStatus &EvalStatus,
29 SemaProxy *SProxy,
30 ConstantExprKind ConstexprKind = ConstantExprKind::Normal)
31 : EvalStatus(EvalStatus), EvalMode(EvalMode),
32 ConstexprKind(ConstexprKind), SProxy(SProxy) {}
33};
34
35} // namespace interp
36} // namespace clang
37
38#endif
39