1//=== SemaProxy.h - Sema proxy for effectual constant evaluation ----------===//
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// This file implements a proxy to the Sema class that can be provided to the
10// constant evaluator, thereby facilitating evaluations capable of acting on and
11// querying the AST.
12//
13//===----------------------------------------------------------------------===//
14
15#ifndef LLVM_CLANG_SEMA_SEMAPROXY_H
16#define LLVM_CLANG_SEMA_SEMAPROXY_H
17
18#include "clang/AST/SemaProxy.h"
19#include "clang/Basic/SourceLocation.h"
20
21namespace clang {
22class FunctionDecl;
23class Sema;
24
25namespace sema {
26
27class EvalProxy : public clang::SemaProxy {
28public:
29 explicit EvalProxy(clang::Sema &SemaRef) : SemaRef(SemaRef) {}
30
31 void instantiateFunctionDefinition(SourceLocation PointOfInstantiation,
32 FunctionDecl *Function) override;
33
34private:
35 Sema &SemaRef;
36};
37
38} // namespace sema
39} // namespace clang
40
41#endif
42