mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-24 20:30:14 +01:00
Update pre-commit versions (#6666)
Most versions are through `pre-commit autoupdate --freeze`, clang-format was manually updated to the latest at https://github.com/ssciwr/clang-format-wheel My read of the style changes here are that they seem fine, none of them look like regressions (which has caused me to delay/adjust updates in the past).
This commit is contained in:
@@ -85,8 +85,7 @@ template <TemplateString Kind, TemplateString File, int Line,
|
||||
#ifdef NDEBUG
|
||||
[[noreturn]]
|
||||
#endif
|
||||
[[gnu::cold, clang::noinline]] auto
|
||||
CheckFail(Ts&&... values) -> void {
|
||||
[[gnu::cold, clang::noinline]] auto CheckFail(Ts&&... values) -> void {
|
||||
if constexpr (llvm::StringRef(FormatStr).empty()) {
|
||||
// Skip the format string rendering if empty. Note that we don't skip it
|
||||
// even if there are no values as we want to have consistent handling of
|
||||
|
||||
+13
-11
@@ -108,8 +108,8 @@ class MapView
|
||||
// Lookup a key in the map and try to return a pointer to its value. Returns
|
||||
// null on a missing key.
|
||||
template <typename LookupKeyT>
|
||||
auto operator[](LookupKeyT lookup_key) const
|
||||
-> ValueT* requires(std::default_initializable<KeyContextT>);
|
||||
auto operator[](LookupKeyT lookup_key) const -> ValueT*
|
||||
requires(std::default_initializable<KeyContextT>);
|
||||
|
||||
// Run the provided callback for every key and value in the map.
|
||||
template <typename CallbackT>
|
||||
@@ -221,10 +221,11 @@ class MapBase : protected RawHashtable::BaseImpl<InputKeyT, InputValueT,
|
||||
|
||||
// Convenience forwarder to the view type.
|
||||
template <typename LookupKeyT>
|
||||
auto operator[](LookupKeyT lookup_key) const
|
||||
-> ValueT* requires(std::default_initializable<KeyContextT>) {
|
||||
return ViewT(*this)[lookup_key];
|
||||
}
|
||||
auto operator[](LookupKeyT lookup_key) const -> ValueT*
|
||||
requires(std::default_initializable<KeyContextT>)
|
||||
{
|
||||
return ViewT(*this)[lookup_key];
|
||||
}
|
||||
|
||||
// Convenience forwarder to the view type.
|
||||
template <typename CallbackT>
|
||||
@@ -415,11 +416,12 @@ auto MapView<InputKeyT, InputValueT, InputKeyContextT>::Lookup(
|
||||
template <typename InputKeyT, typename InputValueT, typename InputKeyContextT>
|
||||
template <typename LookupKeyT>
|
||||
auto MapView<InputKeyT, InputValueT, InputKeyContextT>::operator[](
|
||||
LookupKeyT lookup_key) const
|
||||
-> ValueT* requires(std::default_initializable<KeyContextT>) {
|
||||
auto result = Lookup(lookup_key, KeyContextT());
|
||||
return result ? &result.value() : nullptr;
|
||||
}
|
||||
LookupKeyT lookup_key) const -> ValueT*
|
||||
requires(std::default_initializable<KeyContextT>)
|
||||
{
|
||||
auto result = Lookup(lookup_key, KeyContextT());
|
||||
return result ? &result.value() : nullptr;
|
||||
}
|
||||
|
||||
template <typename InputKeyT, typename InputValueT, typename InputKeyContextT>
|
||||
template <typename CallbackT>
|
||||
|
||||
Reference in New Issue
Block a user