operators.h 946 B

12345678910111213141516171819202122232425
  1. // Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. // Exceptions. See /LICENSE for license information.
  3. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. #ifndef CARBON_TOOLCHAIN_CHECK_CPP_OPERATORS_H_
  5. #define CARBON_TOOLCHAIN_CHECK_CPP_OPERATORS_H_
  6. #include "toolchain/check/context.h"
  7. #include "toolchain/check/operator.h"
  8. #include "toolchain/sem_ir/ids.h"
  9. namespace Carbon::Check {
  10. // Looks up the given operator in the Clang AST generated when importing C++
  11. // code using argument dependent lookup (ADL) and return overload set
  12. // instruction.
  13. auto LookupCppOperator(Context& context, SemIR::LocId loc_id, Operator op,
  14. llvm::ArrayRef<SemIR::InstId> arg_ids) -> SemIR::InstId;
  15. // Returns whether the decl is an operator member function.
  16. auto IsCppOperatorMethodDecl(clang::Decl* decl) -> bool;
  17. } // namespace Carbon::Check
  18. #endif // CARBON_TOOLCHAIN_CHECK_CPP_OPERATORS_H_