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 bool InConstantContext = false;
23 bool CheckingPotentialConstantExpression = false;
24 bool CheckingForUndefinedBehavior = false;
25
26 EvalSettings(EvaluationMode EvalMode, Expr::EvalStatus &EvalStatus,
27 ConstantExprKind ConstexprKind = ConstantExprKind::Normal)
28 : EvalStatus(EvalStatus), EvalMode(EvalMode),
29 ConstexprKind(ConstexprKind) {}
30};
31
32} // namespace interp
33} // namespace clang
34
35#endif
36