Minor updates to support newer Clang versions. (#4234)

A flag was renamed after LLVM 18, and a warning caught a couple more
trivially fixed issues.
This commit is contained in:
Chandler Carruth
2024-08-21 15:29:45 +00:00
committed by GitHub
parent d57aa57215
commit f75cbea7ce
2 changed files with 4 additions and 2 deletions
+2 -2
View File
@@ -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*>()) {
@@ -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;
}
}