/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#ifndef BUILD_CLANG_PLUGIN_MOZSEARCH_PLUGIN_BINDINGOPERATIONS_H_
#define BUILD_CLANG_PLUGIN_MOZSEARCH_PLUGIN_BINDINGOPERATIONS_H_

#include <clang/AST/ASTContext.h>
#include <clang/AST/Decl.h>
#include <clang/AST/DeclCXX.h>
#include <llvm/Support/JSON.h>

void findBindingToJavaClass(clang::ASTContext &C, clang::CXXRecordDecl &klass);
void findBoundAsJavaClasses(clang::ASTContext &C, clang::CXXRecordDecl &klass);
void findBindingToJavaFunction(clang::ASTContext &C,
                               clang::FunctionDecl &function);
void findBindingToJavaMember(clang::ASTContext &C,
                             clang::CXXMethodDecl &method);
void findBindingToJavaConstant(clang::ASTContext &C, clang::VarDecl &field);

void emitBindingAttributes(llvm::json::OStream &json, const clang::Decl &decl);

#endif  // BUILD_CLANG_PLUGIN_MOZSEARCH_PLUGIN_BINDINGOPERATIONS_H_
