Files
carbon-lang/explorer/parse_and_execute/BUILD
T
Chandler CarruthandJon Ross-Perkins 13de9e9d06 Fix outstanding clang-tidy errors. (#3654)
Recent runs of `clang-tidy` for me started showing more errors, and this
is a collection of changes to address them.

First, I've systematically applied the disabling tag to all C++ rules
under //explorer/... with `buildozer` so we don't spend time analyzing
this code or reporting errors from it. Not sure this was strictly
necessary, but it seemed like a nice consistency improvement.

Next, I disabled a buggy check for missing `default` cases in
`switch`es. It seems to get confused by the fancy conversions in our
`enum_base.h`. We don't miss much with this as the Clang compiler
warnings for `switch` catch most of our actual bugs. I also removed the
local disabling of this now that it is turned off centrally.

Lastly, I added error checking to two file descriptor manipulating calls
in the `file_test` infrastructure.

---------

Co-authored-by: Jon Ross-Perkins <jperkins@google.com>
2024-01-26 18:20:47 +00:00

44 lines
1.3 KiB
Python

# Part of the Carbon Language project, under the Apache License v2.0 with LLVM
# Exceptions. See /LICENSE for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
load("@rules_cc//cc:defs.bzl", "cc_library", "cc_test")
package(default_visibility = [
"//explorer:__pkg__",
"//explorer/fuzzing:__pkg__",
])
cc_library(
name = "parse_and_execute",
srcs = ["parse_and_execute.cpp"],
hdrs = ["parse_and_execute.h"],
# Running clang-tidy is slow, and explorer is currently feature frozen, so
# don't spend time linting it.
tags = ["no-clang-tidy"],
deps = [
"//common:check",
"//common:error",
"//explorer/base:trace_stream",
"//explorer/interpreter:exec_program",
"//explorer/interpreter:stack_space",
"//explorer/syntax",
"//explorer/syntax:prelude",
"@llvm-project//llvm:Support",
],
)
cc_test(
name = "parse_and_execute_test",
size = "small",
srcs = ["parse_and_execute_test.cpp"],
# Running clang-tidy is slow, and explorer is currently feature frozen, so
# don't spend time linting it.
tags = ["no-clang-tidy"],
deps = [
":parse_and_execute",
"//testing/base:gtest_main",
"@com_google_googletest//:gtest",
],
)