Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor updates to support newer Clang versions. #4234

Merged
merged 1 commit into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions bazel/cc_toolchains/clang_cc_toolchain_config.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ def _impl(ctx):
# https://github.com/llvm/llvm-project/issues/70384
if not clang_version or clang_version == 18:
missing_field_init_flags = ["-Wno-missing-field-initializers"]
elif clang_version > 18:
missing_field_init_flags = ["-Wno-missing-designated-field-initializers"]
else:
missing_field_init_flags = []

Expand Down
4 changes: 2 additions & 2 deletions explorer/interpreter/pattern_analysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ using llvm::isa;
namespace Carbon {

auto AbstractPattern::kind() const -> Kind {
if (const auto* pattern = value_.dyn_cast<const Pattern*>()) {
if (value_.is<const Pattern*>()) {
return Compound;
}
if (const auto* value = value_.dyn_cast<const Value*>()) {
Expand Down Expand Up @@ -52,7 +52,7 @@ auto AbstractPattern::elements_size() const -> int {
} else if (const auto* value = value_.dyn_cast<const Value*>()) {
if (const auto* tuple = dyn_cast<TupleValue>(value)) {
return tuple->elements().size();
} else if (const auto* alt = dyn_cast<AlternativeValue>(value)) {
} else if (isa<AlternativeValue>(value)) {
return 1;
}
}
Expand Down
Loading